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

Plastic PPRuNer
25 Anniversary
 
Joined: Sep 2000
Posts: 1,902
Likes: 0
From: Rochechouart, France
Oh alright then....its very clumsy but it works (tested up to 2000 directories - quite quick, a few seconds) - 2000/XP only I'm afraid.

Now I'll have to redo it in old DOS and solicit some initial user input and dress it up and make it pretty and make an executable and........

-------------------------------------------------------
cls

rem makedirs.bat

set /A counter=0
set filename=0
rem counter is numeric and filename is a string
:start
set /A counter=%counter%+1
if %counter% LEQ 9999 set filename=%counter%
if %counter% LEQ 999 set filename=0%counter%
if %counter% LEQ 99 set filename=00%counter%
if %counter% LEQ 9 set filename=000%counter%
md %filename%
rem Set your number of desired directories here (2000 in this case)
if %counter% EQU 2000 goto end
goto start
:end

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

......I'd forgotten what a PITA this stuff is.....

:-)

Mac
Mac the Knife is offline  
Reply