PDA

View Full Version : create folder from a list (WXP-Home)



leriderfoudu77
12-15-2005, 05:56 AM
Hi everybody,
I hope you're allright.
Tanks to pay attention to my request :))
I would like to do a script ( .bat ) which create a list of folder whiwh names are written in a text file (user.txt).
the text fil looks like :
20901
20902
21401
...
and the folders should have the names :
20901
20902
21401
...
here, I hope you will be able to help me:)
Thanks

motoflop
12-15-2005, 02:06 PM
Here is one. Save it to makedirs.bat or whatever:

@echo off
if "%1"=="" echo "usage: makedirs dirlistfile" && goto :EOF
set file=%1
for /f "tokens=1* delims=" %%i in (%file%) do mkdir %%i