I am writing a batch file to automate and carry out a list of tasks. One part of my work is to add certain repetitive lines to a text file.

However each time the line must be accompanied by a number running from 0001 to 7000. (I need 0001 as 1 in itself would change the format and lead to other errors)

Any help with writing this simple loop program using bat file command would be greatly appreciated.
Thanks.

i think a vbscript file can do this task... you want to write to a text file like 0001, 0002 and so on ...

why need a bat file..it's quite hard to do that...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.