Start .EXE, .BAT or .COM file from batch file

If you want the start command to run the MENU.EXE file that’s located in say the root directory of drive C:, you would type:

start c:\menu.exe

If you want the start command to run the MENU.BAT file that’s also located in the root directory of drive C:, you would type:

start c:\menu.bat

If you had a MENU.EXE, MENU.BAT and a MENU.COM all located in the same directory and you didn’t specify which one you wanted to run, like so:

start c:\menu

DOS would start the MENU.COM file. If MENU.COM didn’t exist it would start the MENU.EXE file. If MENU.EXE didn’t exist it would start the MENU.BAT file. In other words, if you don’t specify which one you want to run, DOS looks for .COM files first, then .EXE then .BAT. To keep it from doing this, simply specify which one you want DOS to run, i.e.,

Leave a Reply

You must be logged in to post a comment.