Generating a list of numbers

L

LWG

I need to generate a list of numbers from 4000 - 5500, just a list as
follows:

4000
4001
4002
4003...

can any help with ideas?

appreciate it...
 
M

Marty List

Use the FOR command with the /L switch.


From the command line:
For /L %A In (4000,1,5500) Do @Echo %A

From a batch file, change the single percents to double:
For /L %%A In (4000,1,5500) Do @Echo %%A


Use "FOR /?" to view the syntax.
 
L

LWG

M, for strikes again. Where do I put the output file name? Should I use >>
at the end?

thx, L
 
K

KC Wong

M, for strikes again. Where do I put the output file name? Should I use >>
at the end?

Using > will erase the old file if already exists. Use >> to append.
And since you're doing this in a FOR loop, you should use >>.


KC.
 

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

Top