Hello,
I am trying to make a batch file which echos text based on an input.
Here is the code I have so far:
---------------------------------------------
@echo off
set /p input=
If %input%=="hello" or %input%=="hi" or %input%=="hey" or %input%=="yo" or %input%=="hello?" or %input%=="hi?" or %input%=="hey?" or %input%=="yo?"
@echo off
echo Hello. How are you today?
If %input%=="I am good" or %input%=="Good" or %input%=="Great" or %input%=="I am great" or %input%=="Awesome" or %input%=="I am awesome"
@echo off
echo I am glad to hear that.
If %input%=="Who are you" or %input%=="What are you" or %input%=="Who are you?" or %input%=="What are you?"
@echo off
echo I am a program.
Else
@echo off
echo I don't understand that.
-----------------------------------------------
when I save the file and run it, it all at once echos the first three results, then tells me that 'else' is not an operable command and then the program closes. What am I doing wrong?
I am trying to make a batch file which echos text based on an input.
Here is the code I have so far:
---------------------------------------------
@echo off
set /p input=
If %input%=="hello" or %input%=="hi" or %input%=="hey" or %input%=="yo" or %input%=="hello?" or %input%=="hi?" or %input%=="hey?" or %input%=="yo?"
@echo off
echo Hello. How are you today?
If %input%=="I am good" or %input%=="Good" or %input%=="Great" or %input%=="I am great" or %input%=="Awesome" or %input%=="I am awesome"
@echo off
echo I am glad to hear that.
If %input%=="Who are you" or %input%=="What are you" or %input%=="Who are you?" or %input%=="What are you?"
@echo off
echo I am a program.
Else
@echo off
echo I don't understand that.
-----------------------------------------------
when I save the file and run it, it all at once echos the first three results, then tells me that 'else' is not an operable command and then the program closes. What am I doing wrong?