PDF Print E-mail

Calling Another Executable from Within a Batch Script

Written by Daniel Mundy
Thursday, 11 February 2010 14:10

Suppose you wanted to call a program or another script from within your batch file. There are at least two ways of doing this that I know about.

 

First, you can just enter the path to the executable, like so:

c:\windows\notepad.exe

Run the script and notepad will open. You'll notice that the command window stays open until notepad is closed, because the script waits for the command to exit before it continues processing.

If you want to continue immediately without waiting for notepad to close, you can use the "start" command, like so:

start c:\windows\notepad.exe

The start command can do other things like adjusting priority, etc. Just type "start /?" to get an idea.

Trackback(0)
Comments (0)Add Comment

Write comment

busy
Last Updated on Saturday, 29 May 2010 20:12
 

Are you stuck?

This tech stuff isn't for everyone. If you'd rather just pay someone to fix it for you, email daniel@mundy.com.au.
I'll be happy to help you.


Daniel Mundy