I am intested in creating a batch file that can read in a text file which has four variables: customer name, customer number, customer order, products orders. I am using:

FOR /F "delims=, tokens=1,2,3,4" %%f in (test.txt)do md g:\%%f\%%g\%%h\%%i

However, it does not seem to create the subdirectories correct.

Can any one help?

link|improve this question
5  
What output do you see if you replace the md with echo md? Are there spaces in the file name? Why not quote them path? – Zoredache Oct 6 '11 at 22:31
feedback

1 Answer

I suspect you may have spaces in some of the parameters. Try this:

FOR /F "delims=, tokens=1,2,3,4" %%f in (test.txt) do md "g:\%%f\%%g\%%h\%%i"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.