Find Read Only Files in Multiple Directories

By | 4 March, 2009

A quick Bat script that will read input from a txt file with folder locations and identify read only files outputting them to a csv file.


Echo Off

wuauclt > Folder_Check_Results.csv

SET count=1

FOR /f “tokens=*” %%a in (Folders_to_Check.txt) DO (

Dir %%a /a:r-d /b >nul 2>nul && ECHO %%a >> Folder_Check_Results.csv
Dir %%a /a:r-d /b >> Folder_Check_Results.csv

SET /a count+=1



When the batch file is run it reads from “Folders_to_Check.txt” which is just text file you create with the names of all the folders you want to check.

Leave a Reply