Generating a list of numbers

  • Thread starter Thread starter LWG
  • Start date Start date
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...
 
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.
 
M, for strikes again. Where do I put the output file name? Should I use >>
at the end?

thx, L
 
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.
 
Back
Top