Dos batch command

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

Saw the following in a magazine to create multiple folders but cant get
it to work:

From inside a folder and a command prompt type:

For /L %a IN (1.1.5) DO MD %a (return)

The numbers in brackets I gather are in steps of 1 and the 5 is the
number of folders required. Though I get no error messages neither do I
get any folders created.
Would like to know if I have typed the line correctly.

Thanks

Ian
 
Ian said:
Saw the following in a magazine to create multiple folders but cant get it
to work:

From inside a folder and a command prompt type:

For /L %a IN (1.1.5) DO MD %a (return)

The numbers in brackets I gather are in steps of 1 and the 5 is the number
of folders required. Though I get no error messages neither do I get any
folders created.
Would like to know if I have typed the line correctly.

Thanks

Ian

Try this instead:

For /L %a IN (1,1,5) DO MD %a

If you type for /? at the Command Prompt then you get
full help for the FOR command. In this case you get

FOR /L %variable IN (start,step,end) DO command
 
Try this instead:

For /L %a IN (1,1,5) DO MD %a

If you type for /? at theCommandPrompt then you get
full help for the FORcommand. In this case you get

FOR /L %variable IN (start,step,end) DOcommand

Many thanks Pegasus.
Now I can put that to rest. I must also try that /? command.
with winxp I'm afraid the little I knew of Dos has all but gone now.
Thanks for your help.

Regards
 
Many thanks Pegasus.
Now I can put that to rest. I must also try that /? command.
with winxp I'm afraid the little I knew of Dos has all but gone now.
Thanks for your help.

Regards

You're welcome. Since you're about to get started on this
stuff, you might want to update your vocabulary. "DOS" is
an operating system introduced some 30 years ago and now
largely dead. It could never do this sort of thing. The above
commands work in the "Command Prompt" environment
under Windows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top