Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Directory Searcher - Batch Code Bank


Directory Searcher
this is a program that I put together using batch programming. This program uses the dir command and searches through a directory of your choice and all its sub directoriews on the computer and then it saves this information to a log file in an external folder. this program needs to be set up so that the information gets saved properly. to use this program you have to have the batch program and a file called "DirSearchLogs" the spelling is important XD. You can always go back and edit the code though so it saves the information else where.
                @ echo OFF
cd .\DirSearchLogs
set /P username=Enter your name :
set /P purpose=What is your purpose for running this program :
set /P name=Enter Log name (If the log already exists this info will be appended) :
set /P path=Enter the path you want to search (e.g. C:, or c:\dell):

echo START OF LOG >> %name%_DirSearchlog.txt
echo Program written by: sh4d0-haxor >> %name%_DirSearchlog.txt
echo Date created: January 21, 2009 >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
date /T >> %name%_DirSearchlog.txt
echo . >> %name%_DirSearchlog.txt
time /T >> %name%_DirSearchlog.txt
echo . >> %name%_DirSearchlog.txt
echo Program Used by : _%username%_ for the following purpose : _%purpose%_ >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
echo Ipconfig >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
ipconfig >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
echo . >> %name%_DirSearchlog.txt
echo Directory and sub directories >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
dir /S %path%\ >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
echo END OF LOG >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
date /T >> %name%_DirSearchlog.txt
echo . >> %name%_DirSearchlog.txt
time /T >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
echo --------------------------- >> %name%_DirSearchlog.txt
echo Complete
@ echo ON
pause
            
Comments
Sorry but there are no comments to display