Can a batch script file run multiple commands at the same time?
Posted on 2007-04-05
I've got a dos batch file that is scheduled to run every night to copy/backup files from different workstations at different branches to my server across different VPN links.
Right now, the batch file runs one line after the other. Is there any way to have run multiple lines at the same time??? I want to copy files from multiple branches at the same time. But I only want one item in the task scheduler.
Sample of current batch file
Robocopy \\branch1\sharename c:\backup\branch1 /e
Robocopy \\branch2\sharename c:\backup\branch2 /e
Robocopy \\branch3\sharename c:\backup\branch3 /e
Because the available download bandwidth at the main office is so much greater than the available upload bandwidth at the remote branches, I can run all three copies at the same time, and get the job done in 1/3 the time.
I know I could schedule each of the three, but with so many scheduled tasks in there already I would like to tell the batch file to run all three at the same time.
Is it possible?