Text files as input to batch command
Posted: 12 Jan 2009 01:37
Hi everyone!
I would like to ask how can I create a batch file that inputs data from a text file? Say, I create a batch file with the command "del", and I want it to delete all the files listed in a text file.
My Text file:
1.jpg
2.jpg
3.jpg
How can I make the batch file delete all these files?
I know you can do it this way:
@echo off
set /p Test=<text.txt
del %Test%
However, how do I do it for multiple lines in a text file?
Thank you!
I would like to ask how can I create a batch file that inputs data from a text file? Say, I create a batch file with the command "del", and I want it to delete all the files listed in a text file.
My Text file:
1.jpg
2.jpg
3.jpg
How can I make the batch file delete all these files?
I know you can do it this way:
@echo off
set /p Test=<text.txt
del %Test%
However, how do I do it for multiple lines in a text file?
Thank you!