I have a folder with loads of subfolders. I need a batch file that looks down the list of subfolders and checks if a specified file exists. If the file does not exist then the sub folder can be deleted.
This needs to run on Windows 7 workstations.
I am getting my syntax mixed up in my for /f and if exist commands:
for /f /f%% in ('dir /b c:\test') do if exist "test.txt" rename c:\test\%% tobedeleted
I think I am either trying to do to much in one argument or am missing something vital.
No comments:
Post a Comment