Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

Batch files

Recommended Posts

Okay, I want to make a batchfile with options in it so it will load certain things...in other words, a numerical menu type thing. How do I go about that? Please e-mail me if you know at pilottobombadier@yahoo.com


Share this post

Link to post

Bah! That's easy. There's a few different ways to do it. You can use "choice" or you could do it the easy way. Just write a batch file that displays the options. Then write a separate batch file for each option.

For example.


echo Welcome to the wonderful world of Doom!
echo What would you like to do?
echo 1: Play Doom?
echo 2: Play Doom2?
echo 3: Play the wonderful new megawad Alien Vendetta?
echo 4: quit
echo Type the number of the option of your choice, and press the enter key.

You would then write 4 separate batch files named 1 through 4.






doom2 -file av.wad


echo Thank you, have a nice day :)

The advantage of this method is there is no limit to the number of options. It's also much easier to add or remove new options later.

Share this post

Link to post

Oh one thing I forgot. Make sure you place the line:

@echo off

at the top of each batchfile. This will stop the lines from being displayed twice.

Share this post

Link to post
This topic is now closed to further replies.
Sign in to follow this