Answer the question
In order to leave comments, you need to log in
How to create a batch file that will remove files from a list?
How to create a batch file that will remove files from a list?
There is a file that contains the names of text documents (1.txt 2.txt 3.txt).
When I run a batch file, it should read the names of text documents from this list and delete the files. How to do it?
All files are located in the D:\lab folder
Answer the question
In order to leave comments, you need to log in
set files_list=c:\a.list
dir /b /sc:\*.bat >>%files_list%
for /f %%A in ("%files_list%") do del /q %%A
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question