Windows Shell Scripting Help

Kush

High On Life!
Joined
13 Jan 2002
Messages
4,590
ok guys same thing as linux hehe, i actually figured out a lot of stuff in an hour by trial and error, felt like it would be annoying to ask but how do i use an if not statement properly?

i want to ask the use a question say

What is the Space Ship's Name?
and if the user doesnt enter enterprise in any casing (i used /i)
then it tells him he is incorrect
set /P Answer1=1.What is the Space Ship's Name?
echo ******************************
if /i %Answer1%==Enterprise echo You Are Correct
if not /i %Answer1%==Enterprise echo You Are Incorrect <-- cant get this part to work
 
Why not use "else"?

And ECHO. inserts a blank line (in case you don't want to use "***..."
 
well it is used as an underlying line in, i also did use echo. to create blank lines, i tried to use else but else isnt recognized, i finished it though thanks for trying to help
 
Thanks for letting me try. I almost felt important for a moment.
 
i actually got it like an hour or so ago, but saw that no one replyed so i didnt feel like bumping the thread hehe :D thanks for trying though
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back