bsharath
asked on
Search all machines C drive
Hi,
I want a script which can search the C drives of all machines in a txt file.For the extensions *.PST.If there are any files with *.Pst i want it to be listed in the results file.
regards
Sharath
I want a script which can search the C drives of all machines in a txt file.For the extensions *.PST.If there are any files with *.Pst i want it to be listed in the results file.
regards
Sharath
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
:: Script Start
@Echo Off
@Echo. >C:FileResult.txt
FOR /F %%c IN (Computers.txt) DO (
@Echo Checking system %%c
@Echo ----------------- >>C:FileResult.txt
@Echo %%c : .PST Files >>C:FileResult.txt
@Echo ----------------- >>C:FileResult.txt
Dir /b \\%%c\C$\*.PST >>C:FileResult.txt
@Echo. >>C:FileResult.txt
)
:: Script End