The following DOS batch file snippet cycles through file names in files.txt and processes them with a python script (which I didn't write).
for /F "usebackq delims=" %%x in ("files.txt") do (
if not "!line:~0,1!"=="'" echo Passed TEST: %%x
if not "!line:~0,1!"=="'" (
echo "Working on: " %%x ">>>>>>>>>>>>>>>>>>>>>"
python mypy.py -u myuser -p mypwd %%x
The Python program mypy.py now takes multiple arguments (%%x's). Is there a way to emulate Unix's `cat filename` in DOS to let %%x be a space separated list of filenames, and then the python is executed?
e.g. If files.txt contained
as it stands now, the python command resolves to:
python mypy.py -u myuser -p mypwd f1.txt
python mypy.py -u myuser -p mypwd f2.txt
I want it to resolve to:
python mypy.py -u myuser -p mypwd f1.txt f2.txt
Can this be done in DOS batch?