Loading ...
Sorry, an error occurred while loading the content.

Re: [BATCH WORLD] Calling a bat within a bat

Expand Messages
  • giskier
    You can either add an exit command as the last line of the batch file as suggested. This may not be the most elegant solution since it will close the command
    Message 1 of 3 , Aug 13, 2008
    • 0 Attachment
      You can either add an exit command as the last line of the batch file as
      suggested. This may not be the most elegant solution since it will close
      the command window when running under other circumstances. This may be
      undesirable. I like better the following solution:

      start "" /belownormal /wait cmd.exe /C c:\batch\cleantemp.bat

      Why do you need to open a new window? If you don't you can just do
      "cmd.exe /C c...etc". If you don't need another command window, you could
      simply do call c:\batch\cleantemp.bat. In this last case it would not run
      in belownormal priority.

      Hope this helps.

      GISkier.


      Gary Kuznitz wrote:
      >
      > Hi,
      >
      > I have a small problem that I would like to solve. I have a bat file that
      > has
      > this line in it:
      > Start "" /belownormal /wait C:\Batch\CleanTemp.bat
      >
      > The original bat file opens a cmd window that stays open. (That's good)
      > The line opens another cmd window and it runs. When it's done running I
      > have
      > to close the second window for the first window to continue.
      >
      > I would like to either run the line in the first window so it will
      > continue
      > when it finishes or find a way to close the second window automatically
      > when it
      > finishes.
      >
      > Thank you,
      >
      > Gary Kuznitz
      >
      >

      --
      View this message in context: http://www.nabble.com/Calling-a-bat-within-a-bat-tp18017574p18975371.html
      Sent from the Batch World mailing list archive at Nabble.com.
    Your message has been successfully submitted and would be delivered to recipients shortly.