Hi,
I am a complete newbie on batch programming.
The following line is causing me a problem in my batch file
for /d %%X in ("%cd%\*") do echo %%X
When I run this within C:\Documents and Settings .i.e the %cd% value then it seems to have a problem with the spaces in "C:\Documents and Settings". I expected it to list all the directories in C:\Documents and Settings. It does on some windows boxes but not others.
I think its an issue with %'s but don't know the solution.
Can anyone help.
Thanks
for command issue
Moderator: DosItHelp
Re: for command issue
I almost use the DIR command for those things
BTW you don't need %cd%.
Regards
aGerman
Code: Select all
for /f "tokens=* delims=" %%X in ('dir /ad /b') do echo %%X
BTW you don't need %cd%.
Regards
aGerman