How to find a file!? .. it is somewhere in some of the several hard drives or back up cds but where?
Just in case you are like me, you might have accumulated several files (thousands or millions of them) over the years and these files are conveniently scattered in several different hard drives, usb sticks and backup cds or dvds.
Every now and then you are likely to face a need to find some file that is couple of years old and you don’t necessarily even remember from which year or what the file name has been.
Of course you have no idea which hard drive or backup cd it might reside in. You could have a vague idea of the file type that you are looking for or maybe even some educated guesses what the file name or part of the name might be.
Instead of plugging half a dozen hard drives or even more data dvds one at the time into the pc and doing file searches with what windows offers ( which can be quite a daunting job), you could try this little command line utility I been hobbying with.
For want of a better name it’s now called FileListSearch.
Here is the basic idea:
First you need to make file lists from all the hard drives you wish to search from. Oh yes this means of course you need to plug all those hard drives into your pc and issue one command for each of them.
But the nice thing is that once you have done it you will have those lists handy for all the possible future searches.
so here is how it is done:
1) insert your hard drive into pc
2) open command prompt: windows key + R and then write cmd and enter OK
4) issue this commandwith this kind of format:
dir /S /-C <DRIVE LETTER>: > drive_filelisting.txt
beware that this might produce quite a hefty text file. If you have 1TB hard drive full of stuff it may produce a listing that is several hundreds of megabits large, so make sure you have enough disk space for the lists.
so for example if you want to make a listing from usb stick found in drive G: you could make following command:
dir /S /-C G: > g_usb_drive_listing.txt
do thise steps 1-4 for all the drives and cd/dvds or usbs you want to search from.
(and while you are on it make a list of your local hard drive too)
put those file lists into some specific directory (be sure there is no other files in that directory if you want to use wild card option for selecting file lists into the search).
then change into directory where you want to store file search results:
and make a search like this (this is for searching from a single file list):
C:/path/to/this/filesearchapp/FileListSearch.exe --search=searchword --listingfiles=C:\User\myname\myfilelists\g_usb_drive_listing.txt
FileListSearch app needs these options as minimum: searchword (your search phrase) and listingfiles listing one or more file list file containing the lists
so if you want to search from more than one file lists list all of them in listingfiles option like this
C:/path/to/this/filesearchapp/FileListSearch.exe --search=searchword --listingfiles=C:\User\myname\myfilelists\g_usb_drive_listing.txt C:\User\myname\myfilelists\myhard_drive1_listing.txt
you can also use a wild card to search from all the filelists in one directory (be sure that this directory contains only file lists):
C:/path/to/this/filesearchapp/FileListSearch.exe --search=searchword --listingfiles=C:\User\myname\myfilelists\*
there is several other options too you can check them issuing this command:
Download the FileListSearch program here. (Your browser might flag this as a rare item.. )
Here is the source code.