I am writing a program that will open a program when the user types in: "Open chrome" then it will open chrome. I have this:
SET /P Start=What should i do?
IF /i "%start%"==" open calculator" GOTO CALCULATOR
:CALCULATOR
Start C:\windows\system32\calc.exe
So at Calculator it starts the program calculator. But i want the user to type in "Open" and the code knows that "Open" = "Start" and whatever comes next is what it has to open.
So the code takes apart what the user types in so if they type in "Open" then it turns that into start and puts it in the code so:
set /p "Input= "
%Input% + %Input2.exe
so the first thing the user types in equals Input and the second thing the user types in equals Input2 so they can type in Start Calc and the code will be: Start calc.exe because it's added a .exe in the second word that the user types in.
When you give me an answer can you please explain what each bit does?