DOS Batch - File Search List

Quickly find a file on your hard drive.

Description:

This batch creates a lookup list of all files on the C: drive.
When running the batch the first time type a hyphen in order to build the lookup list first.

Features:
  • The lookup list will be appended to the batch file itself.
  • Options: build/rebuild lookup list, or locate a file
  • Regular expressions are supported, see FINDSTR for details.
Script: Download: BatchListOfFiles.bat  
1.
2.
3.
4.
5.
6.
@REM....&SETLOCAL ENABLEEXTENSIONS&SETLOCAL DISABLEDELAYEDEXPANSION
@REM....&set /p s=FileSearch, type '-' to refresh lookup list: ||GOTO:EOF
@REM....&if .%s% NEQ .- echo.&findstr %s% "%~f0"&PAUSE&GOTO:EOF
@REM....&findstr /b /c:"@REM....&" "%~f0">"%~f0.txt"
@REM....&dir /s/b c:\ 1>>"%~f0.txt"&move /Y "%~f0.txt" "%~f0"
@REM....&GOTO:EOF
Script Output:
 DOS Script Output
FileSearch, type '-' to refresh lookup list: logoMed.gif

C:\Python22\tcl\tk8.3\images\logoMed.gif
Press any key to continue . . .