Tuesday, December 1, 2015

Windows cmd: Create Incrementing Folders With For Loop

Bring up Windows console with Win+R and cmd, type

for /l %i in (1,1,100);do mkdir %i

Syntax

      FOR /L %%parameter IN (start,step,end) DO command 

Notice that, double percentage symbol is used for batch file, and on the command line

%%parameter : A replaceable parameter:
                 in a batch file use %%i (on the command line %i)

References

No comments:

Post a Comment