Export a List of File Names from File Manager Search
We recommend you bookmark this blog. Trying to find helpful information in forums usually just ends in making you frustrated and angry. This blog does not speculate or guess. If we post it, we've tried it and it works. As always, if you don't want to be bored by the Scenario, simply jump to the Instructions portion below.
Because I'm constantly searching for files on an attached device—and I am searching for a word in the contents, and not just in the titles of the files—I am going to install and use the Catfish search app. (Nautilus does not index attached devices.) You will also want to download and install the NormCap and GearLever Apps before you start. We will use them later on. IMPORTANT EXPLANATION; I have found the deb version (and the flathub build) of NormCap to be wonky on Ubuntu Linux. But what I have found to work beautifully together is the appimage version of NormCap when launched within Gear Lever, an app that is made for launching appimages. Notice: GearLever is a Flatpak app. Nothing at all wrong with that, but some people do not like to use Flatpak or Snap apps.
Scenario:
I download a ton of public domain books and other publications that I use for research and republication. Though I try to be disciplined and meticulous in categorizing the downloads into numerous folders and sub-folders, with more than 10,000 files I find myself doing a lot of searches for certain words or phrases in certain files within certain folders. Here's an illustrative example.
I have a single word I am looking for because it has been, for 75 years, a hot topic in general public discourse (let's say, so as not to offend anyone, the word is :"blooper.") Then I want to export or copy and paste the search results (list of files) into either a text or spreadsheet document (I chose the latter, but the result is that it winds up in both a doc and a spreadsheet). The last thing you need to know before we move on to the specific instructions is that all the files I want to search are on a Passport drive attached to my computer.
Instructions:
Steps:
Now, I want to search for the appearance of a word in all files in a particular folder, and I want to search for it in the text of all files in that folder, not just search in the file names. (As this is a Linux-based blog, I will give you my experience in the Linux environment only.) Here we go:
- Launch Catfish.
- Select the folder you want to search. (It gets a little tortuous here, but I've not discovered a better, quicker way).
- In the Catfish menu (three bars at the top right), make sure you designate "search all contents", then type in the word you want to search and hit the Enter key on your keyboard.
- When the search is complete, launch NormCap using GearLever and use it to highlight the filenames in the Catfish search screen. NormCap will OCR the text and place it into the Clipboard.
- Create a new document (I Use LibreOffice Writer) and paste the clipboard info into the doc. If your Catfish search returns several pages of file names, you will need to do several NormCap copy and paste actions. NOTE THAT THE NPR,CA[ OCR'S ARE USUALLY SPOT-ON, BUT NO OCR IS PERFECT. BE SURE TO VERIFY PARAGRAPH BREAKS IN THE WRITER FILE.
- In the Writer file, highlight the pasted text and choose Table, Convert, Text. You should now have a table with one row for each tile name.
- Select and copy all the rile names in all the rows (all at one time). While in the Table format, sort by name.
- Next, convert the table back to text. Copy all.
- Open a new spreadsheet and paste the clipboard contents into the spreadsheet. Save the spreadsheet.
Bonus screenshots in this post!
Comments
Post a Comment