W
whitesmith
I'm writing a batch file that displays all the subdirectories under
the current directory. So I wrote:
for %%d in (dir *.* /b /s) do echo %%d
which produces this output:
dir
/b
/s
Not exactly what I wanted! So then I tried a simplification:
for %%d in (*.*) do echo %%d
which produces no output at all! I've used for loops like this in
batch files a zillion times before with predictable results. Can
anyone suggest what's wrong? I'm running XP Pro with SP3. Auto-
updating is turned on. The box has 1.5 GB of RAM and a 320 GB hard
drive. The OS passes Windows Genuine Advantage validation.
Many thanks to all who reply.
the current directory. So I wrote:
for %%d in (dir *.* /b /s) do echo %%d
which produces this output:
dir
/b
/s
Not exactly what I wanted! So then I tried a simplification:
for %%d in (*.*) do echo %%d
which produces no output at all! I've used for loops like this in
batch files a zillion times before with predictable results. Can
anyone suggest what's wrong? I'm running XP Pro with SP3. Auto-
updating is turned on. The box has 1.5 GB of RAM and a 320 GB hard
drive. The OS passes Windows Genuine Advantage validation.
Many thanks to all who reply.