Setting a DOS variable from a text file

Connectix Connectix os pack w/win xp hom...
December 3, 2009 at 10:14:02
Specs: Windows XP, Intel 1Gb
I have a Text file with about 150 lines and need to create a seperate directory using the MKDIR command for each line in the text file. I am not very familiar with loop commands. Is there someone that can help me.

See More: Setting a DOS variable from a text file

Report •

December 3, 2009 at 11:02:50
for /? from command prompt tells about looping... in this case a rough-draft:

for /f "tokens=* delims=" %%a in (text.txt) do (
md %%a)

but i'm sure you are needing more than that but just didn't know to ask: what sub-string from the line names the directory and is the substring delimited or just absolute column no.s and where you want the subdirs created.
this draft just uses the whole line and puts the subdir in same dir. as text.txt and the batchfile itself.

Report •

December 3, 2009 at 11:05:04
for /f "usebackq tokens=whatever delims=whatever" %a in ("your file") do md "%a"

For anything that's actually helpful, we'll need some of the contents of that file, as well as which parts of the lines are used as the new directories' names.

Report •

Related Solutions

Ask Question