I have a Windows batch script which basically loops through a directory and searches for subdirectories, and then it calls an executable program (.exe), and gives the found subdirectory as an argument to the executable program.
for a SubDir in the Directory:
call Program.exe -argument "SubDir" ...
As per current implementation the calling of Program.exe is sequential, i.e. each subdirectory is processed one after another. This is rather slow since I have >20 subdirectories. Therefore, I would like to improve the runtime of the processing.
One way how the the whole batch script would run much faster would be if I could run the Program.exe in parallel on multiple cores/threads. Could this be possible in a batch script or would I have to write a little python/java program to do the parallel processing?
Of course, my batch script would have to then call this python/java program.