Skip navigation

How do I call a batch file from within another batch file?

A. Simply entering a batch file’s name within another batch file will run the batch file you want to call. However, after the called batch file completes, it won’t pass control back to the calling batch file. Thus, the calling batch file will be incomplete. To call a batch file and have the file return to the calling batch file after the called file completes, use the call command.

Also, learn how to write a long command in a batch file.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish