Picture of Batch File Guide
Hi! Welcome to my Batch File Guide, I am relatively new to the batch language.  This is not an extremely detailed guide, because I believe that it is good to learn about this much of Batch and then start learning something like Python.  Also, if you have any suggestions or see something wrong with my guide, then please contact me, I like feedback. Remember, if you like my Instructable, please comment, favorite, and or SUBSCRIBE! Thank you.

Step 1: Saving Your Batch File

After you write your batch program in your text editor (I use Notepad), you have to save the program as a .bat file. So you save it as your_file_name.bat, you must have the .bat ending every time or it will save as a .txt file instead of a .bat file.


Full screen batch matrix

Ploopy1 month ago
I made a four function calculator:
@echo off
color 0a
goto start
echo Mini Calculator!
echo Choose ur first number!
set /p fnum=">"
goto 2
echo Choose ya operation
echo 1 for +
echo 2 for -
echo 3 for *
echo 4 for /
set /p op=">"
if %op%==1 goto 4
if %op%==2 goto 5
if %op%==3 goto 6
if %op%==4 goto 7
echo Choose ur second number!
set /p snum=">"
goto 1
echo ur result is
echo %res%
echo Do another calculation?
echo Y/N:
set /p rstart=">"
if %rstart%==Y goto start
if %rstart%==N exit

set /a res = fnum + snum
goto 3

set /a res = fnum - snum
goto 3

set /a res = fnum * snum
goto 3

set /a res = fnum / snum
goto 3
amei41 year ago


@echo off


echo Hello %username%




echo Hello %username%

echo Would you like to start

echo 1. Chrome (install)

echo 2. Internet Explorer

echo 3. Download Chrome

echo 4. Firefox (install)

echo 5. Download Firefox

echo 6. Opera (install)

echo 7. Install Opera

echo 8. Exit

set /p in=

if %in%==1 start chrome.exe

if %in%==2 start iexplore.exe

if %in%==3 start iexplore.exe https://www.google.com/intl/en/chrome/browser/

if %in%==4 start C:\Program Files\Mozilla Firefox\firefox.exe

if %in%==5 start iexplore.exe http://www.mozilla.org/en-US/firefox/new/

if %in%==6 start C:\Program Files\Opera.exe

if %in%==7 start iexplore.exe www.opera.com

if %in%==8 exit

) else (

goto loop




echo %in% is not acceptible

echo Please write something acceptible

echo 1 2 3 4 5 6 7 8 is acceptible


goto top

electronicz (author)  amei41 year ago

Cool, I made something like this in the past : )


mjlush1 year ago
I'm really sorry to be negative about this .. but to be really really honest I would never advise anyone to put much effort into learning 'batch' programming. For one simple reason that a) its not portable (this instructable will work in MS windows and nowhere else) and more importantly b) its kind of a dead end (you start to push the limits quite quickly). I'd suggest that learning a scripting language like Python or Perl, you can do everything you can do in batch and its a gateway to much much more. The only time batch is worthwhile is when your not in a position to install anything better or your writing a smarter launcher/installer.
electronicz (author)  mjlush1 year ago

Hi, thanks for the feedback, and you aren't being negative at all. I whole heartedly agree with you. I recommend people to look a little at Batch and then learn something like Python (that is what I have been learning). I think someone shouldn't get farther than as far as this Instructable goes, because it is just meant for moving files, deleting files, and doing different tasks on your computer. You can make small programs and little games with Batch, but something like Python is way better suited for the job. Thanks for the feedback and I agree with you.