1

I have an .exe file which takes two jpg images as arguments and makes some processing on them. So, the command in cmd is:

myfile.exe base_image.jpg image1.jpg

The first image is standard, while the second one changes and I need this execution to be repeated over 50000 images. So in each iteration the command is modified as

myfile.exe base_image.jpg image2.jpg

myfile.exe base_image.jpg image3.jpg

...

myfile.exe base_image.jpg image50000.jpg

Rephrasing it I need to execute this: myfile.exe base_image.jpg image%d.jpg for d [1,50000]

All the necessary files are placed in the same folder. Is it possible to write a batch file for this job?

1 Answer 1

2

That's a single command, so you don't really need a batch file

for /l %%a in (1,1,50000) do myfile.exe base_image.jpg image%%a.jpg
Sign up to request clarification or add additional context in comments.

1 Comment

Don't forget to change %%a to %a if running from the command line without using a batch file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.