Sunday, June 13, 2010

how to create for loop using cmd

we can easily create a no. of file or directory using loop

syntax is too easy ,man

for /l %%a in (1,1,10) do dir >>%%a.mp3

step1) open notepad
step2) paste above code(written in red)
step3) save as any name with bat extension
example ad.bat
double click on this ad.bat n see da magic......................

here
(1 1 10)
intialization increament/decreament max limit

as was in for loop of c.
here %%a is the variable i 've taken.........................
n it creates 10 .mp3 files

that's it............................

No comments:

Post a Comment