Wednesday, November 9, 2011

Create folder loop batch file

This creates a folder within a folder within a folder in a specified number of times. As useless as other files, but it feels easier than learning how to use the for function in command prompt. Just change the lend= at the start to change the number of iterations.

@echo off
set lsta=1
set linc=1
set lend=10
set /a a=%lsta%-1
:loop
set /a a=%a%+1
md %a%
cd %a%
if not %lend%==%a% goto :loop
:end

0 comments, add yours>>: