B
BigDaddyCool
Suppose I'm in a directory c:\temp. How do I write a for loop that will
create 26 directories, one for each letter of the alphabet? So like after the
for loop executes, the directory will have 26 folders like this:
c:\temp\a
c:\temp\b
c:\temp\c
....
c:\temp\z
Now, I know that to do this from the command-line, you tupe:
FOR %a IN (A B C) DO MKDIR %a
....but when I copy and paste the command into a file called CreateDirs.cmd
and double click that, it doesn't work. Why does it work at the command line
and not in the .cmd file?
create 26 directories, one for each letter of the alphabet? So like after the
for loop executes, the directory will have 26 folders like this:
c:\temp\a
c:\temp\b
c:\temp\c
....
c:\temp\z
Now, I know that to do this from the command-line, you tupe:
FOR %a IN (A B C) DO MKDIR %a
....but when I copy and paste the command into a file called CreateDirs.cmd
and double click that, it doesn't work. Why does it work at the command line
and not in the .cmd file?