Find files easily with simple batch file

Knowing the files on computers is one of the issues that every system administrator usually deals with. You can easily learn it by creating a simple batch command with the following commands.

open Notepad and copy following commands and paste in this note file.

echo %SystemRoot%\Security\logs\scecomp.dat > c:\%computername%.txt
dir %SystemRoot%\Security\logs\scecomp.dat >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\System32\iapfltr.dat >> c:\%computername%.txt
dir %SystemRoot%\System32\iapfltr.dat >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\Security\logs\sceRoot.dat >> c:\%computername%.txt
dir %SystemRoot%\Security\logs\sceRoot.dat >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\Security\logs\sceback.old >> c:\%computername%.txt
dir %SystemRoot%\Security\logs\sceback.old >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\Security\logs\scesetup.dat >> c:\%computername%.txt
dir %SystemRoot%\Security\logs\scesetup.dat >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\System32\ntsec.dat >> c:\%computername%.txt
dir %SystemRoot%\System32\ntsec.dat >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\System32\cacls.exe >> c:\%computername%.txt
dir %SystemRoot%\System32\cacls.exe >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\System32\Drivers\cacls.exe >> c:\%computername%.txt
dir %SystemRoot%\System32\Drivers\cacls.exe >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\System32\drivers\adpu160.sys >> c:\%computername%.txt
dir %SystemRoot%\System32\drivers\adpu160.sys >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\System32\adpu160.sys >> c:\%computername%.txt
dir %SystemRoot%\System32\adpu160.sys >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\System32\Drivers\adpu160.sys >> c:\%computername%.txt
dir %SystemRoot%\System32\Drivers\adpu160.sys >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\IME\IMESC5\DICTS\PINTLGBS.IMD >> c:\%computername%.txt
dir %SystemRoot%\IME\IMESC5\DICTS\PINTLGBS.IMD >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\Security\logs\sceback.old >> c:\%computername%.txt
dir %SystemRoot%\Security\logs\sceback.old >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\system32\desk.cfg >> c:\%computername%.txt
dir %SystemRoot%\system32\desk.cfg >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\IME\IMESC5\DICTS\PINTLGBP.IMD >> c:\%computername%.txt
dir %SystemRoot%\IME\IMESC5\DICTS\PINTLGBP.IMD >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\system32\svcsstat.exe >> c:\%computername%.txt
dir %SystemRoot%\system32\svcsstat.exe >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\system32\winhttpc.dll >> c:\%computername%.txt
dir %SystemRoot%\system32\winhttpc.dll >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo svcsstat.dll /s >> c:\%computername%.txt
dir svcsstat.dll /s >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\system32\wshnetc.dll >> c:\%computername%.txt
dir %SystemRoot%\system32\wshnetc.dll >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt
echo %SystemRoot%\SysWow64\wshnetc.dll >> c:\%computername%.txt
dir %SystemRoot%\SysWow64\wshnetc.dll >> c:\%computername%.txt
echo —————————————————— >> c:\%computername%.txt

save_as_batch_file

Save as findfiles.cmd to Desktop

run_as_administrator

open cmd as Administrator

deskto_cmd

navige to Desktop and run the batch file

system_root

The file created with the machine name will appear in the root directory.

batch_file_output

Enjoy!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s