Batch File Operating.

Need Help With Opening Optional Websites With a Batch File

Page 1 of 1

1 Replies - 761 Views - Last Post: 20 June 2010 - 03:28 PM Rate Topic: -----

#1 Guest_Minor CGuru*


Reputation:

Batch File Operating.

Posted 20 June 2010 - 02:37 PM

Well I Need Help With This Batch File. I Want To Make A Batch File That When You Run It Say's Internet with a list of websites and you can choose what one to pick by writing the number. but when i did it doesnt work.



Ive Tried Multiple Codes such as

@echo off

title    Website Loader

cls

echo Internet

echo.

echo 1. youtube

echo 2. google

echo 3. facebook

echo 4. runescape

echo 5. hotmail

echo 6. maplestory

echo.

set imput=

set /p= Website Number Here:

if %input%==1 goto Youtube
:1
start http://www.youtube.com

if %input%==2 goto Google
:1
start http://www.google.com

if %input%==3 goto Facebook
:1
start http://www.facebook.com

if %input%==4 goto Runescape
:1
start http://www.runescape.com

if %input%==5 goto Hotmail
:1
start http://www.hotmail.com

if %input%==6 goto Maplestory
:1
start http://www.maplestory.com



But It Doesnt Work Any Help Please.

This post has been edited by NickDMax: 20 June 2010 - 03:29 PM
Reason for edit:: added code tags: [code] -- paste your code here -- [/code]


Is This A Good Question/Topic? 0

Replies To: Batch File Operating.

#2 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Batch File Operating.

Posted 20 June 2010 - 03:28 PM

See examples of using choice.exe

@echo off
choice /C:12 /M "[1]Google [2]Bing"
IF errorlevel 2 goto :do_bing
IF errorlevel 1 goto :do_google
echo Invalid Choice
exit 1

:do_bing
echo starting bing.com
start www.bing.com
exit 0

:do_google
echo starting google.com
start www.google.com
exit 0


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1