Batch file to delete specific files in multiple folders on network
Budget: $10 – $30 CAD
Need a batch file to delete a specific set of files, names listed in text file (e.g. List.txt) from 28 folders on network one by one.
e.g
C:/folder/DMP Hop LTS/app_D
C:/folder/DMP Hop LTS/app_D1
C:/folder/DMP Hop LTS/app_D2
C:/folder/DMP Hop LTS/app_D3
...
C:/folder/DMP Hop LTS/app_D27
OR
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D1
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D2
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D3
..
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D27
List.txt will have list of files names (without full path).
ABC1.txt
BC1.doc
LT32.xls
The batch file needs to have a loop to go through each folder one by one and delete all files listed in List.txt text file.
If file not found, it will log this with the folder name and file name in appending date_log.txt file.
All 28 folders are identical but just folder names different. Following working ok for one folder only but need to run it in the loop so same set of files could be deleted in all listed folders.
for /f "delims=" %%f in (List.txt) do del "%%f"
So need an error-free batch file that could delete files in 28 folders.
No hit and try, if you are an expert in batch file scripting, get back to me with cost. Need it soon.
e.g
C:/folder/DMP Hop LTS/app_D
C:/folder/DMP Hop LTS/app_D1
C:/folder/DMP Hop LTS/app_D2
C:/folder/DMP Hop LTS/app_D3
...
C:/folder/DMP Hop LTS/app_D27
OR
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D1
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D2
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D3
..
\\192.168.125.37\C$\folder\DMP Hop LTS\app_D27
List.txt will have list of files names (without full path).
ABC1.txt
BC1.doc
LT32.xls
The batch file needs to have a loop to go through each folder one by one and delete all files listed in List.txt text file.
If file not found, it will log this with the folder name and file name in appending date_log.txt file.
All 28 folders are identical but just folder names different. Following working ok for one folder only but need to run it in the loop so same set of files could be deleted in all listed folders.
for /f "delims=" %%f in (List.txt) do del "%%f"
So need an error-free batch file that could delete files in 28 folders.
No hit and try, if you are an expert in batch file scripting, get back to me with cost. Need it soon.