3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Helpful Batch File Search

Helpful Batch File Search
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.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Getting Prepared

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.

« Previous StepDownload PDFView All StepsNext Step »
33 comments
Nov 16, 2010. 5:34 PMcmdmaster says:
No wonder any of these work! They contain wrong Command Sets!!!
Jan 24, 2010. 1:31 PMTheBatchies says:
I'm terribly sorry, but the grammar and spelling in this instructable was just terrible. I honestly couldn't understand a thing. Better luck next time.
Jan 28, 2010. 12:44 PMTheBatchies says:
Oh, sorry! I didn't know. I didn't mean it like that, I though you were doing it on purpose! I thought you were purposely trying to make it like that, but I understand now. Oh, I'm really sorry! Please understand!
Sep 28, 2009. 8:32 PMJ-Manoo7 says:
i know this is an older instructable but i was wondering if i could still get any help. I am trying to perform a search on my computer but instead of searching in a list of the file names, i want to find files on my computer that match the files names i give it, preferably line by line in a text file, example: file1.txt file5.exe lots_of_junk.html i can give this in a text file and have one file on every line of the text. next (which is where my problem is) is i need the computer to find the files that have the same name of the files given and copy, delete, or move them. the end result should be able to find the file anywhere on the system even if the file is hidden. If i need to elaborate on anything let me know, thx for the help
Oct 1, 2009. 3:56 PMJ-Manoo7 says:
#1 it can be in a given list, but it can also be in the program itself, i was trying to do an 'if exist' but the options of where it searches are limited # 2 seems like it will work, i will create this and try it on my computer and see how it works #s 3 and 4, well i would do that but, to elaborate on the purpose of the program i wish to write, this will be stealth-run on a friend's computer who copied the (dangerous) contents of my flash drive. he made copies to multiple computers and removable memory so im looking for a way to run an automated search that can find the location of the files and put them in a log (like #2 that you suggested) so i can delete them manually. i could have the program auto delete but if another file on the system is named the same as one of my files then it would also be deleted. and if he has renamed any of my files i want to know where the rest of them are. they will be hidden from the search is he renames them, but he copied my entire flash drive so he would be renaming for a long time and i know he won't rename them all because some of them are dependent upon other files. i already know how to get it on his computer and to run in stealth. also, does your program find and log hidden files? and can it find folders? thx for the help, again if you need any clarification just say so
Oct 10, 2009. 9:16 AMJ-Manoo7 says:
no problem, i will probably retrieve it with software aid, and im only going to scan and log his C:\ drive, he always puts hidden stuff there because the large WINDOWS and system directories would make it hard to find manually, he has to use the .bat file extension so i will also search for that, he has although re-named every file that he copied so i will have to review alot of the results manually, which will take a very long time, but the names should stand out and seem out of place, thx for the help
Jul 11, 2009. 6:07 AMPsychic Master says:
nevr mind i found it it was named differently
Jul 11, 2009. 6:04 AMPsychic Master says:
im using vista and i cannot find the system properties in my control pannel...
Jun 2, 2009. 12:22 PMlemonie says:
Do I understand that you're creating an index of your entire system, and then searching that?
How quick will it do this, e.g. if I want to find a document I know I've got somewhere in 150GB across 2 drives?

L
Jun 2, 2009. 10:18 PMlemonie says:
Yes, I seem to think there might be a use to the index. If you imported into Excel delimiting with "\" you've got a spreadsheet index which you can search & filter also. If I get around to trying it I'll let you know. L
Jun 4, 2009. 11:30 PMlemonie says:
death note? (no just a habit) I am inclined to try this in Excel, the CTRL-F search is very fast, and you can add an auto filter. If you can import as hyperlinks it'll be useful. L
Jun 5, 2009. 11:52 AMlemonie says:
It does work. How long does it take to pull up all your jpgs with a normal search? Loaded into Excel the autofilter does it real easy (I've got 6626). I might make an Instructable if I figure out a nice way of importing the file.

L
Jun 6, 2009. 1:34 AMlemonie says:
But I can filter for any file type with Excel. |Still playing with it...

L
Jun 4, 2009. 3:37 PMhg341 says:
very nice you could have it set to run every night at 3 am
Jun 4, 2009. 5:09 PMhg341 says:
hey i want to do this for my flash drive how do i get the dir command it know is drive letter
Jun 5, 2009. 6:13 AMhg341 says:
well im runing this for my flash dirve on my flash drive so i can use it on more then one pc i came up with this to slove my promble
my updater
"
echo drive letter:
@set /p d=
@title UPDATE
@del k:\finder\allfiles.log
dir k:\ /s /a /b >> D:\finder\Allfiles.log
"
the finder
"
@set /p d=
echo drive letter:
:start
@echo off
Title Search
color 0a
set /p str=
findstr /I /L /A:FC %str% %d%:\finder\allfiles.log
goto start
"

oh yea do you know how to use if commands?
Jun 5, 2009. 8:24 PMhg341 says:
it only takes a few secs to do my 4 gb so as for the speed thing im fine
i want to ask you something
what is the "|more" for

and i saw you have no drive letter dose that just make do the drive that it is running on?

thanks for the if
Jun 6, 2009. 8:57 PMhg341 says:
oh wow this is so cool i have learned more off the 'ible then any other for batch files (so thanks alot!)
Jun 3, 2009. 4:18 AMPKM says:
One thing that might help with this project- if you run
schtasks /create /sc WEEKLY /d SAT /tn Search-Indexer /tr K:\finder\update.bat /st 21:00:00 /ru username /rp password
from the command line, it will create a scheduled task that runs the update script every saturday at 9pm. You'll have to replace K:\finder\update.bat with the path of the update script, and "username" and "password" in the command above with your own username and password, and that will create a scheduled task. You can also of course change SAT to another day, replace the time, make it daily etc.- this page explains more about the schtasks command. You can then modify and delete the task using Scheduled Tasks in control panel.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
0
Followers
1
Author:FumaKilla
just another ordinary guy who like experiments