-8

I want to make a batch file that gives me a selection to open various executables. For example,

What do you want to open?
1. Application1.exe
2. Application2.exe
3. Application3.exe

Inputting a number will open the desired executable that isn't in the same directory as the batch file itself. So it's basically a launcher.

URSkrub
  • 1
  • 1
  • 2
    "I want to make a batch file" Feel free to do so! And have a look on the [tour] to learn how this site works. This is a duplicate, not researched at all and does not show any attempt of you to find a solution to this problem! – geisterfurz007 Feb 28 '17 at 20:42
  • What a community. – URSkrub Feb 28 '17 at 20:44
  • 2
    This has nothing to do with a community! This is the concept of the site you are using; you show effort, you get help. You show no effort (and not even read the tour tage) you get no help – geisterfurz007 Feb 28 '17 at 20:45

1 Answers1

0
@echo off
:input
    echo What do you want to open?
    echo 1. Application1.exe
    echo 2. Application2.exe
    echo 3. Application3.exe
    set /p "app=: "
    if "%app%"=="1" goto :start Application1.exe
    if "%app%"=="2" goto :start Application2.exe
    if "%app%"=="3" goto :start Application3.exe
    echo Invalid option!
goto :input
:start
    start "" "%~1"
exit
Sam Denty
  • 3,693
  • 3
  • 30
  • 43