PPRuNe Forums - View Single Post - Need help creating a file system
View Single Post
Old 7th March 2010 | 05:43
  #5 (permalink)  
Mac the Knife

Plastic PPRuNer
25 Anniversary
 
Joined: Sep 2000
Posts: 1,902
Likes: 0
From: Rochechouart, France
I loved DOS batch files!

Here is a crude way to do it (I'm sure there are better and neater batch constructs, but its too early on a Sunday morning for me...)

--------------------------------------------------

cls
@echo off

REM makedirs.bat
REM environmental variables used - intCounter

REM initialize test value to be "true"
SET intCounter=1

:while

REM test condition (set to 10 here)
IF %intCounter% GTR 10 (GOTO wend)

REM procedure where condition is "true"
md %intCounter%

REM set new test value
SET /a intCounter=intCounter+1

REM loop
GOTO while

:wend

PAUSE

-------------------------------------------------

:-)

Mac
Mac the Knife is offline  
Reply