I have a file called file.txt in which it contains few lines as
vishnu
ram
gopal
suresh
chandra sekar
prem kumar
nandhu
I have written a batch script to read each line and to create a folder and assign the lines as name to that folder.
FOR /f "tokens=* delims=" %a in (file.txt) DO @md %a
but, the folder created as vishnu, ram, gopal, suresh, chandra, sekar, prem, kumar, nandhu
Here the chandra and sekar are seperated as two folders, but i want the chandra sekar as a single folder name, how to acheive this?
How to read lines in a text file with spaces?
Moderator: DosItHelp
Re: How to read lines in a text file with spaces?
Use Quotes. 
This bloke is not likely to return here.
http://stackoverflow.com/questions/2065 ... tch-script

Code: Select all
@md "%a"
This bloke is not likely to return here.
http://stackoverflow.com/questions/2065 ... tch-script
Re: How to read lines in a text file with spaces?
Thank you very much.. This works.... 
