Archived from groups: microsoft.public.windowsxp.general (
More info?)
Batch files under Win2000/XP are surprisingly powerful. They
allow loops, if/then/else statements, string manipulation and lots
more. The only problem is that they are totally unstructured.
"Jason Ryon" <JasonRyon@discussions.microsoft.com> wrote in message
news:387E32C9-2BB5-41CF-8DD7-9F14E3DE0320@microsoft.com...
> I'm not sure if there are any loops allowed in batch files. You could do
it
> using an AutoIT script (http://www.autoitscript.com/autoit3/index.php)
which
> is really simple. Just replace names.txt with whatever your text file is,
> and it will read in all the file one line at a time, and then create a
> directory with that name (from wherever the script is run. AutoIT is a
free
> scripting language used to automate installs and other things.
>
> ;*****Beginning of Program*****
> #include <array.au3>
> #include <file.au3>
> #include <string.au3>
> Dim $names
> _FileReadToArray("names.txt",$names)
>
> For $i=1 to $names[0]
> $val=DirCreate(StringStripCR($names[$i]))
> Next
> ;*****End of Program*****
>
>
> "Adrian" wrote:
>
> > I have a text file with a list of names, I would like to redirect this
file
> > somehow to the md/mkdir command so that it will read the file and make a
> > directory for each entry in the text file..
> >
> > Is this possible? If so how do i go about doing something like this.
Thanks.