Jump to content

Batch file help


Moo
 Share

Recommended Posts

Hey, I'm trying to write a batch file that will switch my realmlist for wow to easily allow me to switch between a private wow server and the public one, however, I can't get it to work...

Here it is so far:

@echo off

dir "C:Program FilesWorld of Warcraft"

if exist realmlist.wtf DEL realmlist.wtf

cls

choice/c:BMQ /N select lizzard [M]agicstar [Q]uit

pause >nul

IF errorlevel 3 goto end

IF errorlevel 2 goto magicstar

IF errorlevel 1 goto blizzard

:blizzard

copy blizzard.wtf realmlist.wtf

goto end

:maigcstar

copy magicstar.wtf realmlist.wtf

goto end

:end

start launcher.exe

exit

*note, the [ B ] infront of BLizzard is making the text bold, but there is a [ B ] (without spaces) there.

However, apparently choice doesn't work, which confuses me because I've seen references to it on several websites....  Can anybody help me figure out how to do it?

Link to comment
Share on other sites

well, I wanted it to be easily accessible, (just to change the shortcut on my computer to run the command again...)

May be I'm stupid (which I probably am, though hilarity some times ensues through my weired stupidity), but having two short cuts on the desktop sounds more accessible then having to modify one short cut every other click. It's the easiest way I think.:

script0:

@echo off
dir "C:Program FilesWorld of Warcraft"
if exist realmlist.wtf DEL realmlist.wtf
copy blizzard.wtf realmlist.wtf
start launcher.exe
exit

script1:

@echo off
dir "C:Program FilesWorld of Warcraft"
if exist realmlist.wtf DEL realmlist.wtf
copy magicstar.wtf realmlist.wtf
start launcher.exe
exit

Link to comment
Share on other sites

If I were doing this i would replace this...

choice/c:BMQ /N select [B] lizzard [M]agicstar [Q]uit
pause >nul

IF errorlevel 3 goto end
IF errorlevel 2 goto magicstar
IF errorlevel 1 goto blizzard

With this...

ECHO 1. Blizzard
ECHO 2. Magicstar
ECHO 3. Quit

SET /p choice="Please Select an Option: "

IF '%choice%' == '1' GOTO blizzard
IF '%choice%' == '2' GOTO magicstar
IF '%choice%' == '3' GOTO end

Although I do agree with sparda if you have room for two files on your desktop go with sparda's idea

Link to comment
Share on other sites

If I were doing this i would replace this...

choice/c:BMQ /N select [B] lizzard [M]agicstar [Q]uit
pause >nul

IF errorlevel 3 goto end
IF errorlevel 2 goto magicstar
IF errorlevel 1 goto blizzard

With this...

ECHO 1. Blizzard
ECHO 2. Magicstar
ECHO 3. Quit

SET /p choice="Please Select an Option: "

IF '%choice%' == '1' GOTO blizzard
IF '%choice%' == '2' GOTO magicstar
IF '%choice%' == '3' GOTO end

Although I do agree with sparda if you have room for two files on your desktop go with sparda's idea

This works like a charm!  Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...