I want to create something like this
dup.bat infile outfile times
example usage would be
dup.bat a.txt a5.txt 5
at it would create file a5.txt that has the content of a.txt repeated 5 times
however I do not know how to do for loop in batch, how to do it?
You can do the loop like this:
Then to take the input file and repeat it, you could use
MOREwith redirection to append the contents of the input file to the output file. Note this assumes these are text files.