I have a batch file to compress PNG files. When I drag and drop some files on batch, it starts to process all of them in the same time. And it becomes useless when I tried with hundreds of files (sure) :)
The main part is something like that (simplified)
Code: Select all
START "" /W truepng.exe /out "%~n1_out1.png" %1
START "" /W pngwolf.exe --in="%~n1_out1.png" --out="%~n1_out2.png"
Problem is the "%1" part.
I'm trying to make batch to process files with 4-file blocks. Thinking of 2 different aproach, and both fine.
1. Will process the first 4 file, after continue with other 4.
2. Or it will run maximum 4 "pngwolf.exe" instances in the same time (best option)
In my several tests, I started to try with a counter logic %1 after %2 after %n...
But even in that phase I stucked and couldn't create a counter system.
No need to ask, sure I'm newbie on batch coding. But even to be a good designer, looks like I need to learn more on batch.
Thanks for anyone will give a hand. Hope there is a solution that I can understand and adaptate.
All Bests
Evren