cativo May 18, 2009 at 12:42:12 Specs: Windows Vista
I am passing set of files (%1, %2...%n) into a batch file to perform a particular command on each file. The problem is that the number of files can vary. Sometimes I pass 1 file, sometimes I pass 1000 files. Normally you would do something like:
command.exe %1 %2 %3 %4
but how would I do this for varied number of files? Can I loop through and perform the command for each file regardless of how many are passed in? How can I assign a variable %x and increment x until all the files are inputted?
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.