Multithreaded Windows FOR batch command
- by Axarydax
Hi, do you know if there is a simple way to run FOR command in batch file on multiple threads? What's the point of having 4 cores if I can't run my tasks in 4 parallel threads?
For example, if I am optimizing PNGs with PNGOUT, the command I would use is
for %i in (*.png) do pngout "%i"
But this is highly paralellizable task in which the sub-tasks do not depend on each other at all.
To run this in 4 'queues' I'd write something like
for -thread 4 %i in (*.png) do pngout "%i"
Do I need to write my own for-like app that would be able to do this or is there available free solution?