Introduction: Helpful Batch File Search

About: just another ordinary guy who like experiments

Hello.
This is my first instructable. so if I made a mistake please go easy on me.

I had made a simple batch file searcher, to help my self finding the files I need in my HDD jungle.
This batch is so much faster than standard windows search(windows button +f).

Pros:
- Very fast
- easy to make.
- Portable (infact you can memorize all the commands)
- using it makes you look very cool. :D

Cons:
- Limited to file name search only.
- must update data base regularly.
- update might took forever :)

I've searched instructable for similar batch file but found none.
That encourage me to make one.

Step 1: Getting Prepared

1. run cmd on Start->run, type in cmd, press enter.
2. create a new folder. (md anything)
3. add the new folder to your system path variable
control panel->system properties->advanced->environment variable->select path->edit->ok
4. check it on the command window by typing "path" followed by enter button.
5. explore to your new folder.
6. create two new text document.
7. rename one of them into update.
8. rename the other one into search.

Step 2: First Batch File

this is the content of the update.txt file
just copy and paste it into the update.txt

::start
@title UPDATE
@del k:\finder\allfiles.log
@dir c:\ d:\ e:\ f:\ G:\ h:\ I:\ J:\ K:\ /s /a /b >> K:\finder\Allfiles.log
::end

please edit the folder "K:\finder" into the folder name you just made.

save it

note :
you can add or remove the drive letter to suit your system.
the command above will be indexing file name from drive letter C to K.

Step 3: Second Batch File

This is the content of the second file
search .txt
just copy paste it.
::start
@echo off
Title Search
echo use \.extension $ for seeking extenson of file ie:*.mp3
color 0a
findstr /I /L /A:FC "%1 %2 %3" k:\finder\allfiles.log |more
::end

please edit the folder "K:\finder" into the folder name you just made.
save it.

Step 4: Rename the Text Document

go to your command prompt
type
ren *.txt *.bat
press enter
you should get 2 new batch file now instead of text document.

Step 5: Creating the Logs

now run the update.bat
and wait for..........quite some time.
relax it might took 5 to 15 minutes to finish.


after it got finished it will create new file called
allfiles.log
a huge one :)

Step 6: Action

then you can run the search.bat file.
sample of usage

search update
search \.doc (for searching file extension)

more control:
press enter to get one line scrolling.
press space bar to get page scrolling.
press ctrl+c to quit searching.

since it already on your system path you can ran both search and update from any folder,
or even from the run command.

actually if you are an advanced user you can skip few step of this instructible.
hope it will became handy for you as it did for me.
thank you for reading.