Can't get DOS "for" loop to return full filenames with spaces
I want to setup a dos batch file in XP to decode all the mp3 files in a directory using a "for" loop. I am not able to 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 Windows:
Th is 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 else is to be done? Thanks
Re: Can't get DOS "for" loop to return full filenames with spaces
Can you try to only switch from "DOS" to Command Prompt" to avoid being corrected and having the diffs explained to you.