0

I have a .bat file that runs daily, if the return value == 0 i need .bat2 to execute, else run .bat3 How would this be accomplished?

  • 2
    `Call Batch1 && Call Batch2 || Call Batch3`. See answer here for meaning of punctuation http://stackoverflow.com/questions/31820569/trouble-with-renaming-folders-and-sub-folders-using-batch. See `call /?` and previous link for why `call` is necessary (at least for `batch1`). –  Oct 27 '16 at 08:23
  • But this does not consider the return value argument? – Conrad Ryan Oct 27 '16 at 08:26
  • Oh yes it does. –  Oct 27 '16 at 09:09
  • Are "" required for the "location/Batch1/2/3"? – Conrad Ryan Oct 27 '16 at 09:19
  • 1
    `Call "c:\program files\Batch1" && Call c:\windows\Batch2 || Call "c:\windows\Batch3"`. Quotes must be used if path contains a space, otherwise optional. –  Oct 27 '16 at 09:21

0 Answers0