D
dtronvig
I'm trying to set up a DOS batch file (in XP) to decode all the MP3 files in
a directory using a "for" loop. I just can't figure out how to get the "for"
command to return anything beyond the first space in a filename. To simplify
things, I tried this right in the Command window:
The directory contains files "a 1.mp3", "b 1.mp3" and "c 1.mp3". I enter:
for /f usebackq %f IN (`dir /b *.mp3`) do dir "%f"
The resulting echoed commands are
dir "a"
dir "b"
dir "c"
and of course the resulting directory listings are empty.
So `dir /b *.mp3` is producing the list of full filenames, but the "for"
command is just passing along the filenames up to the first space.
What am I missing?
Thanks,
Drew
a directory using a "for" loop. I just can't figure out how to get the "for"
command to return anything beyond the first space in a filename. To simplify
things, I tried this right in the Command window:
The directory contains files "a 1.mp3", "b 1.mp3" and "c 1.mp3". I enter:
for /f usebackq %f IN (`dir /b *.mp3`) do dir "%f"
The resulting echoed commands are
dir "a"
dir "b"
dir "c"
and of course the resulting directory listings are empty.
So `dir /b *.mp3` is producing the list of full filenames, but the "for"
command is just passing along the filenames up to the first space.
What am I missing?
Thanks,
Drew