PEO (16th June 2009)
Im trying to create load of folders and name them from a txt file but it instantly errors.
any ideas what is wrong with it ?Code:@Echo off set basedir=d:\users for /f "tokens=*" %%a in (values.txt) do mkdir %basedir%\%%a![]()
works fine here; what error do you get? What have you got in the file values.txt? is that file in the same location as your batch file?
PEO (16th June 2009)
try set basedir="d:\users"
instead of
set basedir=d:\users
PEO (16th June 2009)
attached screen shot
tryed that and it didnt work
named the file as a .vbs
the txt file has a list of names e.g
Joe loves
Joe bloggs
etc
etc
shouldnt it be named .bat
PEO (16th June 2009)
lmfao!!!! what a dimwitt!!
Im cracking up
Hi, script worked fine after I changed the file extension to a .bat. Just created over 350 individual folder for each student between year 7 and 9.
I wonder If I could have used a dsquerry rather than 1st extracting names to a txt file.
I can now use the same script to copy a file of files in to each user folder.
There are currently 1 users browsing this thread. (0 members and 1 guests)