Introduction: EASY BATCH FILE

Picture of EASY BATCH FILE

This is how to make a simple batch file.

Step 1:

Picture of

OPEN NOTEPAD.

Step 2:

TYPE IN THE FOLLOWING:
@echo off
title MY PROGRAM
color a
echo WELCOME
echo.
echo 1.)START
echo 2.)EXIT
echo.
set /p var=YOUR CHOICE:
if %var%==1 goto HELLO
if %var%==2 exit
:HELLO
cls
echo PLEASE CHOOSE AN OPTION
echo.
echo 1.)OPEN GOOGLE
echo 2.)OPEN EMAIL
echo 3.)SHUTDOWN COMPUTER
echo 4.)EXIT
echo.
set /p var=YOUR CHOICE:
if %var%==1 start www.google.com
if %var%==2 start www.gmail.com
if %var%==3 shutdown -s
if %var%==4 exit
pause
exit

Step 3:

Save as program.bat

Comments

UglyN (author)2017-07-08

I'm not being rude, but you made 2 mistakes:

1. You should put a else statement after choices

2. Who needs to shutdown their computer through a batch file?

DoubleAProgramming (author)2014-07-25

This program works, but you may want to add an else statement after the choices. Currently if you enter a 3 in the first choice then it goes to :HELLO

About This Instructable

3,167views

7favorites

License:

Bio: I'm a 14 year old who enjoys programming and physics
More by rsegura:Using jQuery to make a slide effectEASY BATCH FILEDEATH VIRUS
Add instructable to: