Loop statement within a batch script

I have to create a couple of files within a directory structure.
Filename stays the same, but at the end of each file, the number appears.

Example:
File needs to be created within directory c:\temp
File Name will stay the same (testfile), but extension will increase, starting at 01 - example - testfile01, testfile02, ....

Depending on the day of the month, I will either create 10 files or I will create 26 files or 53, number can very.

Directory will look something like this:

c:\temp
testfile01
testfile02
testfile03.....
testfile10 or 16 or 43 or 32

The value I will change daily

Can anyone help me with a script for this please?

Welcome HenkTrumpie,

Your phrasing and the directory suggest that this is more a Windows question that a Unix one, but in any case, I have a few to questions pose in response first:-

  • Is this homework/assignment? There are specific forums for these.
  • What have you tried so far?
  • What output/errors do you get?
  • What OS and version are you using?
  • What are your preferred tools? (C, shell, perl, awk, etc.)
  • What logical process have you considered? (to help steer us to follow what you are trying to achieve)

Most importantly, What have you tried so far?

There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.

We're all here to learn and getting the relevant information will help us all.

Kind regards,
Robin