for command issue
Posted: 15 Mar 2011 16:32
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
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