Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: make batch go to next line  (Read 2594 times)

0 Members and 1 Guest are viewing this topic.

gbrown

  • Guest
make batch go to next line
« on: August 26, 2007, 01:26:47 PM »
I have a batch file that does a whole lot of file copying.  Each line is to copy to another server.

I would like to call another batch file and then have my first batch proceed to the next line in the file, with out waiting for the call, to complete.  How can I do this...

contents of replicate.bat

call replicate2.bat
robocopy c:\*.* \\server\a
robocopy c:\*.* \\server\b


contents of replicate2.bat

robocopy c:\*.* \\server\c
robocopy c:\*.* \\server\d


Any help would be great.

contrex

  • Guest
Re: make batch go to next line
« Reply #1 on: August 26, 2007, 01:38:21 PM »
Use the START command. See START /? for details.

If this is in the first batch file, replicate2.bat will start in a separate window and the first batch will continue without waiting.

start "" "replicate2.bat"

Or you could have these lines in yet another batch or type them at the prompt

start "" "replicate1.bat"
start "" "replicate2.bat"
start "" "replicate3.bat"

and all 3 would run at the same time independently

gbrown

  • Guest
Re: make batch go to next line
« Reply #2 on: August 26, 2007, 01:50:32 PM »
awesome, start worked great, I guess sometimes its the simplest of things.

Thank you  for your help,
Glenn

contrex

  • Guest
Re: make batch go to next line
« Reply #3 on: August 26, 2007, 01:53:18 PM »
Thank you  for your help,
Glenn

Glenn, you are more than welcome! Have a nice day. Don't forget to come back if you have any more questions.