Help with FOR /D with space in pathname
Posted: 11 Dec 2009 16:43
My FOR loop works when there are no spaces in the path name
But when there is a space it doesn't work (tried enclosing in quotes and still didn't work):
I tried setting the path to a variable and it still didn't work
set logdir=C:\Documents and Settings
Thanks for all the help.
Code: Select all
FOR /D %%i IN (C:\FCTLogs\FirstRun\TestLogs\ABC*) DO RMDIR /S /Q %%i
But when there is a space it doesn't work (tried enclosing in quotes and still didn't work):
Code: Select all
FOR /D %%i IN (C:\Documents and Settings\TestLogs\ABC*) DO RMDIR /S /Q %%i
I tried setting the path to a variable and it still didn't work
set logdir=C:\Documents and Settings
Thanks for all the help.