Currently, I have a script package that I use to copy one large zip file from a network folder to several computers on the network. I need to make these copies in parallel, so I have a for loop that goes through the addresses and runs using robocopy. Here is what i have
for /F "tokens=*" %%A in (IPlist.txt) do ( start robocopy "\\networkfolder" \\%%A )
The problem is that I need to perform the extraction on all the machines that I just copied, but I need to wait for the robocopies to complete. I cannot use start / wait in a for loop since this destroys the parallel copy. Is there a way that I can make the script wait until all robocopies have finished? or an alternative solution?
FYI: I cannot extract from the network folder at first, since zip is a lot of small files and greatly slows down the transfer speed. When copying over a network, it should be one large file.
source share