I have file.txt which contains the name of file.txt as follows.
C:\BatchScript\test\bkk001.txt
C:\BatchScript\test\bkk002.txt
C:\BatchScript\test\ExampleFile.txt
C:\BatchScript\test\korat001.txt
C:\BatchScript\test\korat002.txtAnd I need to set the name of file.txt in each line to variable in order to print out with nodepad.exe command.
NOTEPAD.EXE /PT "%filename%" "%printername%"
Could anyone kindly suggest me to solve this problem?
::untested
for /f "tokens=4 delims=\" %%G in (file.txt) DO NOTEPAD.EXE /PT "%%G" "%printername%"
::you will need to set the printername variable i assume:: mike
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |