PEO Posted June 16, 2009 Posted June 16, 2009 Im trying to create load of folders and name them from a txt file but it instantly errors. @Echo off set basedir=d:\users for /f "tokens=*" %%a in (values.txt) do mkdir %basedir%\%%a any ideas what is wrong with it ?
srochford Posted June 16, 2009 Posted June 16, 2009 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? 1
jmcdermott Posted June 16, 2009 Posted June 16, 2009 try set basedir="d:\users" instead of set basedir=d:\users 1
PEO Posted June 16, 2009 Author Posted June 16, 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
PEO Posted June 16, 2009 Author Posted June 16, 2009 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.
PEO Posted June 16, 2009 Author Posted June 16, 2009 I can now use the same script to copy a file of files in to each user folder.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now