e.g
C:/folder/DMP/app_x1
C:/folder/DMP/app_x2
C:/folder/DMP/app_x3
C:/folder/DMP/app_x4
C:/folder/DMP/app_x5
C:/folder/DMP/app_x6
DeleteList.txt has a list of files names (with path) need to delete from each above folders.
C:/folder/DMP/app_x0/ABC1.txt
C:/folder/DMP/app_x0/ABC1.doc
The batch file needs to have a loop to go through each folder one by one and delete all files mentioned in a text file. Following worked ok for one folder only if I specify the full path before each file's names in DeleteList.txt file.
Code: Select all
for /f "delims=" %%f in (DeleteList.txt) do del "%%f"
DeleteList.txt will not change. So listed files in this text file need to delete from all specified folders.
Any sample code/suggestion would help. Thx.