Launch a .exe file from a .bat file

Issue

I would like to make a batch file that launches a e file that takes a value as input and return an output value.

Solution

It will work same as a DOS example

If you type in DOS prompt

dir c: >c:test

dir is the command (or EXE),

is the command (or EXE), c: is the argument that is passed to the command

is the argument that is passed to the command > c:test is the output redirection, therefore the result is written in the specified file instead of to the screen.

is the output redirection,

From there write a batch file with Notepad containing the lines:

dir c: >c:test echo FINISHED

Save it in a folder accessible by PATH variable or c:.

Your,exe normally displays the string of characters on the screen.

Thanks to amigo for this tip.

Hunter Jones

Hunter Jones

Next Post

Leave a Reply

Your email address will not be published. Required fields are marked *