Introduction: Some Cool Batch Applications

Picture of Some Cool Batch Applications

This is my first instructable so no complaining!
I'd like to thank neodudeman for his instructables, they helped a lot.

In this instructable i will show you some pretty nifty applications with batch commands.

If you have any problems or changes to request just send me an e-mail at jbell@live.co.za
Leave any feedback in the comment section below.

Step 1: Batch Calculator

Picture of Batch Calculator

This is...well... a calculator.
just copy and paste into NOTEPAD and save as calculator.bat
the filename is not important but the extension MUST be saved as " .bat "

@echo off
title Batch Calculator by seJma
color 1f
:top
echo --------------------------------------------------------------
echo Welcome to Batch Calculator by seJma
echo --------------------------------------------------------------
echo.
set /p sum=
set /a ans=%sum%
echo.
echo = %ans%
echo --------------------------------------------------------------
pause
cls
echo Previous Answer: %ans%
goto top
pause
exit

Step 2: Folder Protector

Picture of Folder Protector

This is pretty cool as it requests a password for a folder.
Once you copy it into notepad you must insert your own password and designated folder directory into the designated areas!
NB: THERE ARE TWO PLACES IN WHICH YOU MUST ENTER INFO!!!

@echo off
title Folder Password v1.5
color 0a
set /a tries=3
set password=***ENTER YOUR PASSWORD HERE***
:top
echo.
echo ----------------------------------------------
echo.
echo Folder Password
echo.
echo ----------------------------------------------
echo You have %tries% attempts left.
echo Enter password
echo ----------------------------------------------
set /p pass=
if %pass%==%password% (
goto correct
)
set /a tries=%tries -1
if %tries%==0 (
goto penalty
)
cls
goto top
:penalty
echo Sorry, too many incorrect passwords, initiating shutdown.
start shutdown -s -f -t 35 -c "SHUTDOWN INITIATED"
pause
exit
:correct
cls
echo ----------------------------------------------
echo Password Accepted!
echo.
echo Opening Folder...
echo ----------------------------------------------
explorer ***ENTER FOLDER PATH HERE***
pause

*NOTE: This is not an advanced piece of software, it does not hide or block the destination folder or anything like that so don't get your hopes up.
**Yes, it can now open files with spaces, just use a backslash (\) when typing your filepath.

Step 3: Guessing Game

Picture of Guessing Game

This is a game in which the computer generates a random number, and you must try to guess it.

@echo off
color 0e
title Guessing Game by seJma
set /a guessnum=0
set /a answer=%RANDOM%
set variable1=surf33
echo -------------------------------------------------
echo Welcome to the Guessing Game!
echo.
echo Try and Guess my Number!
echo -------------------------------------------------
echo.
:top
echo.
set /p guess=
echo.
if %guess% GTR %answer% ECHO Lower!
if %guess% LSS %answer% ECHO Higher!
if %guess%==%answer% GOTO EQUAL
set /a guessnum=%guessnum% +1
if %guess%==%variable1% ECHO Found the backdoor hey?, the answer is: %answer%
goto top
:equal
echo Congratulations, You guessed right!!!
echo.
echo It took you %guessnum% guesses.
echo.
pause

*Note: For the backdoor, type "surf33"

Step 4: Site Selector

Picture of Site Selector

This is an application that lets you select from a list of sites.
Feel free to add some of your own sites.

@echo off
color 2f
title Site Selector by seJma
:top
echo ***************************************************************
echo.
echo Site Selector
echo.
echo ***************************************************************
echo.
echo Key: [1] Google - Search Engine
echo [2] Hotmail - Mail Server
echo [3] Yahoo - Search Engine/Mail Server
echo [4] Facebook - Social Networking
echo [5] Myspace - Social Networking
echo [6] CNN - News
echo [7] Weather - Weather
echo [8] WikiHow - A How-To Website
echo [9] Instructables - A How-To Website
echo [10] YouTube - Online Videos
echo [11] Answers - Online Encyclopedia
echo [12] Wikipedia - Online Encyclopedia
echo.
echo [e] Exit
echo.
echo ***************************************************************
echo Enter the number of the website which you would like to go to:
echo.
set /p udefine=
echo.
echo ***************************************************************
if %udefine%==1 start www.google.com
if %udefine%==2 start www.hotmail.com
if %udefine%==3 start www.yahoo.com
if %udefine%==4 start www.facebook.com
if %udefine%==5 start www.myspace.com
if %udefine%==6 start www.cnn.com
if %udefine%==7 start www.weather.com
if %udefine%==7 start www.wikihow.com
if %udefine%==9 start www.instructables.com
if %udefine%==10 start www.youtube.com
if %udefine%==11 start www.answers.com
if %udefine%==12 start www.wikipedia.com
if %udefine%==e goto exit

cls
echo ***************************************************************
echo.
echo Thank You for using Site Selector by seJma
echo.
echo ***************************************************************
echo Type [e] to exit or [b] to go back and select another site.
echo.
set /p udefine=
echo.
echo ***************************************************************
if %udefine%==b goto top
if %udefine%==e goto exit
:exit
cls
echo ***************************************************************
echo.
echo Thank You for using Site Selector by SEjMA
echo.
echo ***************************************************************
pause
exit

Step 5:

Picture of

This is a fake virus that I designed, it looks pretty convincing if you put it in someone's startup folder.
NB: this batch starts a "60 second till shutdown" script when its done. to abort shutdown click START>RUN:shutdown -a
NB: this does not do anything harmful or destructive to your computer.

***NEW: I've added an extra command that disables themes to make it look more realistic.
@echo off
color 47
net stop themes >nul
title DEEP VIRAL INFECTION!
echo VIRAL INFECTION!!!
echo VIRAL INFECTION!!!
echo VIRAL INFECTION!!!
echo ERROR!!!
echo -
echo virus - TROJAN_DEMOLISHER code #45643676
echo -
echo FIREWALL - FAILED
echo -
echo ANTI-VIRUS - FAILED
echo -
echo IP ADDRESS BREACHED!
echo -
echo VIRUS ATTAINING: ****-****-****-8894
echo -

pause
cls
echo -
echo SCANNING INFECTED AREAS...
echo -

pause

set /a num=0
:repeat1
set /a num=%num% +1
echo %num%
if %num%==100 goto end
goto repeat1
:end
cls
echo -
echo 86.5 PERCENT OF MEMORY INFECTED
echo -
echo INFECTION FATAL!
echo -
echo DELETION OF ENTIRE CONTENTS OF LOCAL DISK C: REQUIRED
echo -

pause
cls
echo -
echo DELETING HARD-DRIVE C:
echo -
dir /s

pause
cls
echo -
echo CONTENTS OF HARD-DRIVE C: ERASED
echo -

pause
cls
echo -
echo SCANNING...
echo -

set /a num1=0
:repeat2
set /a num1=%num1% +1
echo %num1%
if %num1%==100 goto end1
goto repeat2
:end1
cls
echo -
echo 0.00 PERCENT OF HARD-DRIVE INFECTED
echo -
pause

echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR

pause
cls
title SYSTEM FAILURE
color 17
echo ERROR!
echo -
echo VISUAL MEMORY LOST!
echo -
echo RAM LOST!
echo -
echo CORE PROCESSOR FAILING...
echo -
echo TOTAL SYSTEM CRASH IMMINENT!
echo -
echo -

pause
cls
echo -
echo -
echo -
echo SHUTDOWN COMPUTER NOW TO AVOID RISK OF FIRE!
echo -
echo -
echo -

pause
cls
echo -
echo -
echo -
echo SEEK PROFESSIONAL HELP IMMEDIATLY TO PREVENT FURTHER DAMAGE!
echo -
echo -
echo -
pause
start shutdown -s -t 60 -c "SYSTEM FAILURE<SHUTTING DOWN TO AVOID FURTHER DAMAGE!"
**NB: Type "shutdown -a" in your Run box to abort a system shutdown
***Type "net start themes" to in your Run box to get the themes service working

Step 6: Done

Picture of Done

Those are some of my applications that I created using notepad.
Remember to save the notepad as yourfilename.bat
PLEASE let me know if any of the applications don't work.
Feel free to edit, change, and do whatever to them.

If you would like help with any of your Batch programs, message me or send me an e-mail at jbell@live.co.za

If you want to try something offline, I recommend getting Learn Batch File Programming! by John Albert, really simple, easy to follow and great if you want to get better!


Happy BATCHing :D

Comments

Kartik S Nayak (author)2017-11-11

Simple calculator

@echo off
Setlocal enabledelayedexpansion
:calc
cls
echo SIMPLE CALCULATOR
echo 1.Add=+
echo 2.Subtract=-
echo 3.Multiply=*
echo 4.Divide=/
echo Put your question
set/p equ=
set/a equ=!equ!
echo Answer=!equ!
pause
goto calc

Kartik S Nayak (author)2017-11-11

Simple calculator

@echo off
Setlocal enabledelayedexpansion
:calc
cls
echo SIMPLE CALCULATOR
echo 1.Add=+
echo 2.Subtract=-
echo 3.Multiply=*
echo 4.Divide=/
echo Put your question
set/p equ=
set/a equ=!equ!
echo Answer=!equ!
pause
goto calc

NissarR (author)2017-10-09

I wrote a script for Calculator

@ECHO OFF

COLOR 17

TITLE CALCULATOR

ECHO Enter the value of x:

SET /p x=

ECHO Enter the operator

SET /p o=

ECHO Enter the value of y:

SET /p y=

if %o%== + GOTO Add

if %o%== - GOTO Sub

if %o%== * GOTO Mul

if %o%== / GOTO Div

if %o%== % GOTO Mod

:Add

ECHO ********************

ECHO ADDITION

ECHO ********************

SET /a z=x+y

ECHO Addition of %x% and %y% is %z%

PAUSE

EXIT

:Sub

ECHO ********************

ECHO SUBSTRACTION

ECHO ********************

SET /a z=x-y

ECHO Substraction of %x% and %y% is %z%

PAUSE

EXIT

:Mul

ECHO ********************

ECHO MULTIPLICATION

ECHO ********************

SET /a z=x*y

ECHO Multiplication of %x% and %y% is %z%

PAUSE

EXIT

:Div

ECHO ********************

ECHO DIVISION

ECHO ********************

SET /a z=x/y

ECHO Division of %x% and %y% is %z%

PAUSE

EXIT

:Mod

ECHO ********************

ECHO MODULUS

ECHO ********************

SET /a z=x%y

ECHO Modulus of %x% and %y% is %z%

PAUSE

EXIT

LloydZ1 (author)2017-06-14

Do you have to add the "https://" part when entering the website for the website picker???

PaulD370 (author)2017-06-12

This is really cool but I just spotted one thing: on step 4, the part where it does start www.wikihow.com says 7 but should be 8

KostasJ (author)2017-05-21

And this is my new game (I made it today)

@echo off
title COINS
color 0a
mode con: cols=39 lines=25

:menu
cls
echo =======================================
echo === COINS ===
echo =======================================
echo.
echo For info type ?
echo.
echo 1) Singleplayer
echo 2) Multiplayer
set menuchoice=
set /p menuchoice=
if %menuchoice% equ 1 goto players_sp
if %menuchoice% equ 2 goto players_mp
if %menuchoice% equ ? goto info
echo.
goto menu

:info
cls
echo.
echo SINGLEPLAYER
echo.
echo Your task is to beat me. There are
echo coins (18 to 40). You have to collect
echo 1, 2 or 3 coins. If it's your turn
echo and there is only one coin left,
echo you lose. GLHF :)
echo.
echo.
echo MULTIPLAYER
echo.
echo It's the same as singleplayer...
echo ...but it's for 2 players ;)
echo.
echo =======================================
echo.
echo To report any bugs, please contact me:
echo.
echo E-mail: kotasekjat@seznam.cz
echo Skype: GD ziffdodo2
echo.
echo.
echo Thanks for playing my game!!!
pause >nul
goto menu

//SINGLEPLAYER

:players_sp
cls
echo.
echo =======================================
echo === PLAYERS ===
echo =======================================
echo.
echo.
set player=
set /p player=Player 1 (enter your name):
echo.
echo Player 2: NPC
ping -n 3 localhost >nul
cls
echo.
echo READY?
ping -n 2 localhost >nul
cls
echo.
echo GO!
ping -n 2 localhost >nul
goto game_p1_1


//PLAYER_1


:game_p1_1
set limit=
set /a limit=%random% %% 18+22
goto game_p1_2

:game_p1_2
cls
echo.
echo Coins left: %limit%
echo.
echo How many coins do you wanna take?
echo.
echo.
if %limit% equ 1 goto p1_loss_sp
set p1=
set /p p1= %player%'s turn:
if %p1% equ 1 goto p1_1
if %p1% equ 2 goto p1_2
if %p1% equ 3 goto p1_3
if %p1% gtr 3 goto p1_fail

:p1_1
set /a limit=%limit%-1
echo.
echo YOU TAKE 1 COIN
ping -n 2 localhost >nul
goto game_pc_check

:p1_2
set /a limit=%limit%-2
echo.
echo YOU TAKE 2 COINS
ping -n 2 localhost >nul
goto game_pc_check

:p1_3
set /a limit=%limit%-3
echo.
echo YOU TAKE 3 COINS
ping -n 2 localhost >nul
goto game_pc_check

:p1_fail
echo.
echo YOU CAN'T TAKE MORE THAN 3 COINS!
ping -n 3 localhost >nul
goto game_p1_2


//PLAYER_PC


:game_pc_check
if %limit% gtr 25 goto game_pc_1
if %limit% leq 25 goto game_pc_2
if %limit% leq 0 goto p1_loss_sp

:game_pc_1
cls
echo.
echo Coins left: %limit%
echo.
echo How many coins do you wanna take?
echo.
echo.
echo NPC's turn: 2
echo.
echo NPC TAKES 2 COINS
set /a limit=%limit%-2
ping -n 2 localhost >nul
goto game_p1_2

:game_pc_2
//1
if %limit% equ 2 goto pc_1
if %limit% equ 10 goto pc_1
if %limit% equ 18 goto pc_1
if %limit% equ 22 goto pc_1
if %limit% equ 6 goto pc_2
//GAPS_1
if %limit% equ 14 goto pc_3
//2
if %limit% equ 3 goto pc_2
if %limit% equ 15 goto pc_2
if %limit% equ 11 goto pc_2
if %limit% equ 19 goto pc_2
//GAPS_2
if %limit% equ 7 goto pc_3
if %limit% equ 23 goto pc_3
//3
if %limit% equ 4 goto pc_3
if %limit% equ 8 goto pc_3
if %limit% equ 12 goto pc_3
if %limit% equ 20 goto pc_3
if %limit% equ 24 goto pc_2
//GAPS_3
if %limit% equ 16 goto pc_1
//IMPOSSIBLE
if %limit% equ 5 goto pc_1
if %limit% equ 9 goto pc_2
if %limit% equ 13 goto pc_3
if %limit% equ 17 goto pc_1
if %limit% equ 21 goto pc_2
if %limit% equ 25 goto pc_3
//PC_LOSS / PLAYER_1 WIN
if %limit% equ 1 goto pc_loss
//PC_WIN
if %limit% leq 0 goto p1_loss

:pc_3
cls
echo.
echo Coins left: %limit%
echo.
echo How many coins do you wanna take?
echo.
echo.
echo NPC's turn: 3
echo.
echo NPC TAKES 3 COINS
set /a limit=%limit%-3
ping -n 2 localhost >nul
goto game_p1_2

:pc_1
cls
echo.
echo Coins left: %limit%
echo.
echo How many coins do you wanna take?
echo.
echo.
echo NPC's turn: 1
echo.
echo NPC TAKES 1 COINS
set a limit=%limit%-1
ping -n 2 localhost >nul
goto game_p1_2

:pc_2
cls
echo.
echo Coins left: %limit%
echo.
echo How many coins do you wanna take?
echo.
echo.
echo NPC's turn: 2
echo.
echo NPC TAKES 2 COINS
set /a limit=%limit%-2
ping -n 2 localhost >nul
goto game_p1_2

:pc_loss
cls
echo.
echo =======================================
echo CONGRATULATIONS
echo =======================================
echo.
echo %player% wins!
echo.
set again=
set /p again=Do you want to play again? -
if %again% equ yes goto player
if %again% equ YES goto player
if %again% equ no goto exit
if %again% equ NO goto exit
exit

:p1_loss_sp
echo.
NPC wins!
echo.
echo You can try your luck again, %player%!
echo.
set again=
set /p again=Wanna try your luck again? -
if %again% equ yes goto player
if %again% equ YES goto player
if %again% equ no goto exit
if %again% equ NO goto exit
exit

//MULTIPLAYER

:players_mp
cls
echo.
echo =======================================
echo === PLAYERS ===
echo =======================================
echo.
echo.
set player1=
set /p player1=Player 1:
echo.
set player2=
set /p player2=Player 2:
ping -n 2 localhost >nul
cls
echo.
echo READY?
ping -n 2 localhost >nul
cls
echo.
echo GO!
ping -n 2 localhost >nul
goto game2_1

:game2_1
set limit2=
set /a limit2=%random% %% 18+22
goto game2_p1


//PLAYER_1


:game2_p1
cls
echo.
echo Coins left: %limit2%
echo.
echo How many coins do you wanna take?
echo.
echo.
if %limit2% equ 1 goto p1_loss_2
if %limit2% leq 0 goto p2_loss_2
set p1_2=
set /p p1_2=%player1%'s turn:
if %p1_2% equ 1 goto p1_1_2
if %p1_2% equ 2 goto p1_2_2
if %p1_2% equ 3 goto p1_3_2
if %p1_2% gtr 3 goto p1_fail_2

:p1_1_2
echo.
echo %player1% TAKES 1 COIN
set /a limit2=%limit2%-1
ping -n 2 localhost >nul
goto game2_p2

:p1_2_2
echo.
echo %player1% TAKES 2 COINS
set /a limit2=%limit2%-2
ping -n 2 localhost >nul
goto game2_p2

:p1_3_2
echo.
echo %player1% TAKES 3 COINS
set /a limit2=%limit2%-3
ping -n 2 localhost >nul
goto game2_p2

:p1_fail_2
echo.
echo YOU CAN'T TAKE MORE THAN 3 COINS!
ping -n 2 localhost >nul
goto game2_p1

:p1_loss_2
echo.
echo =======================================
echo CONGRATULATIONS
echo =======================================
echo.
echo %player2% wins!
echo.
echo You can try your luck again, %player1%!
echo.
set again2=
set /p again2=Do you want to play again? -
if %again2% equ yes goto players_mp
if %again2% equ YES goto players_mp
if %again2% equ no goto exit
if %again2% equ NO goto exit
exit

//PLAYER_2


:game2_p2
cls
echo.
echo Coins left: %limit2%
echo.
echo How many coins do you wanna take?
echo.
echo.
if %limit2% equ 1 goto p2_loss_2
if %limit2% leq 0 goto p1_loss_2
set p2_2=
set /p p2_2=%player2%'s turn:
if %p2_2% equ 1 goto p2_1_2
if %p2_2% equ 2 goto p2_2_2
if %p2_2% equ 3 goto p2_3_2
if %p2_2% gtr 3 goto p2_fail_2

:p2_1_2
echo.
echo %player2% TAKES 1 COIN
set /a limit2=%limit2%-1
ping -n 2 localhost >nul
goto game2_p1

:p2_2_2
echo.
echo %player2% TAKES 2 COINS
set /a limit2=%limit2%-2
ping -n 2 localhost >nul
goto game2_p1

:p2_3_2
echo.
echo %player% TAKES 3 COINS
set /a limit2=%limit2%-3
ping -n 2 localhost >nul
goto game2_p1

:p2_fail_2
echo.
echo YOU CAN'T TAKE MORE THAN 3 COINS!
ping -n 2 localhost >nul
goto game2_p2

:p2_loss_2
echo.
echo =======================================
echo CONGRATULATIONS
echo =======================================
echo.
echo %player1% wins!
echo.
echo You can try your luck again, %player2%!
echo.
set again2_2=
set /p again2_2=Do you want to play again? -
if %again2_2% equ yes goto players_mp
if %again2_2% equ YES goto players_mp
if %again2_2% equ no goto exit
if %again2_2% equ NO goto exit
exit

:exit
exit

KostasJ (author)2017-05-21

Hi! This is my version of the guessing game... Sorry for bad English :)

@echo off
title GUESS!
color 1f
mode con: cols=32 lines=23

:start
cls
echo ------------------------
echo GUESS MY NUMBER!
echo ------------------------
echo.
echo Press any key to begin...
set cheat=ziffdodo2
set ans=%random%
set /a left=20
set /a guesses=0
pause >nul
cls
echo START!
ping -n 2 localhost >nul
cls
goto game

:game
echo.
set /p guess=
if %guess% gtr %ans% echo LOWER!
if %guess% lss %ans% echo HIGHER!
if %guess% equ %cheat% cls && echo You cheater... && echo The answer is %ans%
set /a left=%left%-1
if %left% equ -1 goto loss
set /a guesses=%guesses%+1
echo.
echo %left% attempts left
echo.
if %guess% equ %ans% goto win
goto game

:win
cls
echo --------------------------------
echo Congratulations!
echo --------------------------------
echo.
echo I see you are good in
echo guessing...
echo.
echo It took you %guesses% attempts
echo to guess right.
echo.
echo The answer is: %ans%
echo.
set name=
set /p name=Enter your name:
pushd "%~dp0"
echo %name% has won in %guesses% guesses in %date% at %time% >>Scoreboard.txt && echo. >>Scoreboard.txt
goto win2
:win2
echo.
echo GG %name%!
echo.
set /p again=Wanna play again? -
if %again% equ yes goto start
if %again% equ YES goto start
if %again% equ no goto end
if %again% equ NO goto end
exit

:loss
cls
echo You can try your luck again!
echo.
The answer is: %ans%
echo.
set /p again=Wanna play again? -
if %again% equ yes goto start
if %again% equ YES goto start
if %again% equ no goto end
if %again% equ NO goto end
exit

:end
exit
stevenma727. (author)2017-01-12

so I've been looking around and trying a lot but what is the folder path, isn't it something like user/username/desktop/foldername , if your folder was on the desktop

AnonU1 (author)2016-10-12

Website selector has been edited

@echo off

title Site Selector by seJma

:top

color c

echo.

echo *************************

echo * Website Shortcuts *

echo *************************

echo.

echo ***************************************************************

echo Key:

echo 1- Google

echo 2- Gmail

echo 3- Hotmail

echo 4- Yahoo

echo 5- Facebook

echo 6- Twitter

echo 7- WikiHow

echo 8- Youtube

echo 9- Instructables

echo 10- Wikipedia

echo.

echo [e] Exit

echo.

echo **********

echo Enter key:

echo.

set /p udefine=

echo.

echo ***************************************************************

if %udefine%==1 start www.google.com

if %udefine%==2 start mail.google.com

if %udefine%==3 start www.hotmail.com

if %udefine%==4 start www.yahoo.com

if %udefine%==5 start www.facebook.com

if %udefine%==6 start www.twitter.com

if %udefine%==7 start www.wikihow.com

if %udefine%==8 start www.youtube.com

if %udefine%==9 start www.instructables.com

if %udefine%==10 start www.wikipedia.com

if %udefine%==e goto exit

cls

echo ***********************************************************

echo Type [e] to exit or [b] to go back and select another site.

echo ***********************************************************

echo.

set /p udefine=

echo.

echo ***************************************************************

if %udefine%==b goto top

if %udefine%==e goto exit

:exit

cls

echo ***************************************************************

echo.

echo Thank You for using Website Selector by SEjMA,

echo Edited by DeathPigeon

echo This window will automatically close.

echo.

echo ***************************************************************

goto new

:new

set /a counta=1

:start1

if %counta% equ 3000 goto end2

set /a counta=%counta%+1

goto start1

:end2

exit

AnonU1 (author)2016-10-12

Unlike kushal99 , I actually made your code a little better for you. For example, it starts in max screen, 3 attempts will throw you into a 500 counted loop of characters and at the end will start the shutdown for 20 secs.

I've also renamed it hidden folder password, as you would need to make a batch file linking it I guess, unless you were using it as a batch file password.

Also, Ive made the cmd close on its on shortly after opening the folder. Hope you enjoy.

-----------------------------------------------------------------------------------------------------

@echo off

if not "%1" == "max" start /MAX cmd /c %0 max & exit/b

title Hidden Folder Password v1.6

color 0a

set /a tries=3

set password=[ENTER YOUR NEW PW HERE]

:top

echo.

echo ========================================================================

echo ------------------------------------------------------------------------

echo Please enter directory password for %~f0

echo ========================================================================

echo ------------------------------------------------------------------------

echo You have %tries% attempts left.

echo Please Enter password

echo ------------------------------------------------------------------------

echo ========================================================================

set /p pass=

if %pass%==%password% (

goto correct

)

set /a tries=%tries -1

if %tries%==0 (

goto penalty

)

cls

goto top

:penalty

set /a counta=1

:start

if %counta% equ 1000 goto end

if %counta% equ 999 goto end3

set /a counta=%counta%+1

color c

echo %random%%random% %random%%random% %random%%random% %random%%random% %random%%random% %random%%random%

:end

goto start

:end3

shutdown -f -s -t 20 -c "TOO MANY INCORRECT PASSWORD ATTEMPTS!"

exit

:correct

cls

echo ======================================================

echo ------------------------------------------------------

echo Password Accepted!

echo Opening Locked Folder

echo ------------------------------------------------------

echo ======================================================

explorer %~dp1

goto new

:new

set /a counta=1

:start1

if %counta% equ 500 goto end2

set /a counta=%counta%+1

goto start1

:end2

exit

kushal99 (author)2016-09-24

hey i made this is it working correctly

@echo off

color 3a

:Start2

cls

goto start

:Start

title GTA 5

echo 1) Offline mode

echo 2) Online mode

echo Input your choice

set input=

set /p input= choice:

if %input%==1 goto A if NOT goto Start2

if %input%==2 goto B if NOT goto Start2

:A

color 3a

cls

@echo off

shutdown -s -t 200

shutdown -s -t 210

shutdown -s -t 220

shutdown -s -t 230

shutdown -s -t 240

shutdown -s -t 250

echo Oops!You are hacked.

echo.

echo Sorry your opreating system has being crashed.

:B

cls

color 3a

echo 1) Single player

echo 2) Exit

echo Input your choice

set input=

set /p input= choice:

if %input%==1 goto C if NOT goto Start2

if %input%==2 goto Exit if NOT goto Start 2

:C

color 3a

cls

@echo off

shutdown -r -t 110

shutdown -r -t 120

shutdown -r -t 130

shutdown -r -t 140

shutdown -r -t 150

echo Success game will start in few minutes.

echo Thank You.

:Exit

exit

TheBoyUnionGaming (author)2016-06-17

LOL the virus is cool!!!! especially cause it looks so realistic! LETS MAKE FUN OUT OF MY DAD!!

hey do you want a real virus you can controle with another computer

well sure, my annoying little bro will freak out like nothing before

TheBoyUnionGaming (author)2016-06-17

It doesn't really hide or block the folder, but I know what piece of code you need to insert to make it hide or block the folder hehe XD

GonçaloR4 (author)2016-06-08

Hi, thanks for the apps. It got me started with batch.

I'm trying to launch Messenger which I have as a desktop app but haven't been able to figure out how to do it. Here's what I'm trying:

start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory=Default --app-id=apnipnjoblinbbgeijcfmhbgcfncajmj

Any idea how I could make this work?

Sejma (author)GonçaloR42016-06-10

Try running that exact command but without the "start" command.

So just:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory=Default --app-id=apnipnjoblinbbgeijcfmhbgcfncajmj

AndrewB228 (author)2016-02-17

The folder password doesn't work. Or, it's not effective.

RightClick > Edit with Notepad

If you then look at the code, you can see the password. Not too effective.

ArthurH30 (author)AndrewB2282016-05-27

I made one with custom password, encryption, custom folder, try and error sistem, etc... If you wan't I can send but it's in portuguese

FreezeP (author)AndrewB2282016-04-09

just turn it into a .exe just google bat to exe converter and tada no more looking @ the password

FreezeP (author)AndrewB2282016-04-09

just turn it into a .exe just google bat to exe converter and tada no more looking @ the password

Mr.M11 (author)AndrewB2282016-04-02

this will be a problem with every single batch file.

MisterC2 (author)AndrewB2282016-02-27

If you make an icon and change the name! Then no one will check it!

MatthewR119 (author)2016-04-26

The calculator works but cannot recognize decimal points... Is there some way around this? It seems silly to not be able to use decimals in maths...

Sejma (author)MatthewR1192016-04-27

Batch cannot handle floating point numbers unfortunately. Does seem silly. There are workarounds using VB script but that quickly starts to get complicated.

AluemF (author)2015-11-25

I Make a Rainbow matrix!!!

Check it out:

@echo off

:LOADING

cls

echo Processing.

ping localhost -n 2 >nul

cls

echo Processing..

ping localhost -n 2 >nul

cls

echo Processing...

ping localhost -n 2 >nul

cls

echo Loading....

ping localhost -n 2 >nul

cls

echo Starting.....

ping localhost -n 2 >nul

ping localhost -n 2 >nul

cls

color 0a

echo What do you want to do? Enter your choice

echo 1) Make a matrix falling efect

set/p c=

if %c%==1 goto MATRIX

:MATRIX

cls

echo What colour you want?

echo 1) RAINBOW

echo 2) Red

echo 3) Blue

echo 4) Purple

set/p ch=

if %ch%==1 goto GREEN

if %ch%==2 goto RED

if %ch%==3 goto BLUE

if %ch%==4 goto PURPLE

:GREEN

color 02
color 04
color 01
color 03
color 06
color 07
color 08
color 09
color 05
set a=67841350137489528937018256781344

echo %a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%

goto GREEN

:RED

color 04

set a=67841350137489528937018256781344

echo %a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%

goto RED

:BLUE

color 01

set a=67841350137489528937018256781344

echo %a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%

goto BLUE

:PURPLE

color 05

set a=67841350137489528937018256781344

echo %a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%

goto PURPLE

- http://www.akai-sora.com/forum/

_Swisscrafter_ (author)2015-10-24

sorry guys but there is a big fail, because on this site the format is other,so the words dont match into the lines and that means , it is not working.....confusing but i make a new one with workingg stuff.

this below should work if you set the notepad enough big and THEN copy it.

@echo off
:alphastart
cls
title Tic Tac Toe
set sc1=0
set sc2=0
set af=0
:start
cls
color 0e
set z1=1
set z2=2
set z3=3
set z4=4
set z5=5
set z6=6
set z7=7
set z8=8
set z9=9
if %sc1% GEQ 1 GOTO extra
if %sc2% GEQ 1 GOTO extra
echo.
echo TIC TAC TOE
echo.
echo.
echo Choose a name for Player 1.
echo.
set/p name1=
cls
echo.
echo TIC TAC TOE
echo.
echo.
echo Choose a name for Player 2.
echo.
set/p name2=
cls
:extra

:spieler1a
if %af%==2 GOTO spieler2a
set z1=1
set z2=2
set z3=3
set z4=4
set z5=5
set z6=6
set z7=7
set z8=8
set z9=9
:spieler1
color 0e
cls
echo.
echo TIC TAC TOE
echo %sc1%:%sc2%
echo.
echo %z1% I %z2% I %z3%
echo -----------
echo %z4% I %z5% I %z6%
echo -----------
echo %z7% I %z8% I %z9%
echo.
echo.
echo %name1% sets x.
echo.
echo.
echo Type in "restart" to reset the round or
echo "alpharestart" to restart the file.
set/p x=
if %x%==1 GOTO a1
if %x%==2 GOTO a2
if %x%==3 GOTO a3
if %x%==4 GOTO a4
if %x%==5 GOTO a5
if %x%==6 GOTO a6
if %x%==7 GOTO a7
if %x%==8 GOTO a8
if %x%==9 GOTO a9
if %x%==restart GOTO spieler1a
if %x%==alpharestart GOTO alphastart
if %x%==win GOTO sc1win

:a1
if %z1%==o GOTO spieler1
if %z1%==x GOTO spieler1
set z1=x
goto check

:a2
if %z2%==o GOTO spieler1
if %z2%==x GOTO spieler1
set z2=x
goto check

:a3
if %z3%==o GOTO spieler1
if %z3%==x GOTO spieler1
set z3=x
goto check

:a4
if %z4%==o GOTO spieler1
if %z4%==x GOTO spieler1
set z4=x
goto check

:a5
if %z5%==o GOTO spieler1
if %z5%==x GOTO spieler1
set z5=x
goto check

:a6
if %z6%==o GOTO spieler1
if %z6%==x GOTO spieler1
set z6=x
goto check

:a7
if %z7%==o GOTO spieler1
if %z7%==x GOTO spieler1
set z7=x
goto check

:a8
if %z8%==o GOTO spieler1
if %z8%==x GOTO spieler1
set z8=x
goto check

:a9
if %z9%==o GOTO spieler1
if %z9%==x GOTO spieler1
set z9=x
goto check

:spieler2a
if %af%==1 GOTO spieler1a
set z1=1
set z2=2
set z3=3
set z4=4
set z5=5
set z6=6
set z7=7
set z8=8
set z9=9
:spieler2
color 0e
cls
echo.
echo TIC TAC TOE
echo %sc1%:%sc2%
echo.
echo %z1% I %z2% I %z3%
echo -----------
echo %z4% I %z5% I %z6%
echo -----------
echo %z7% I %z8% I %z9%
echo.
echo.
echo %name2% sets o.
echo.
echo.
echo Type in "restart" to reset the round or
echo "alpharestart" to restart the file.
set/p o=
if %o%==1 GOTO b1
if %o%==2 GOTO b2
if %o%==3 GOTO b3
if %o%==4 GOTO b4
if %o%==5 GOTO b5
if %o%==6 GOTO b6
if %o%==7 GOTO b7
if %o%==8 GOTO b8
if %o%==9 GOTO b9
if %o%==restart GOTO spieler2a
if %o%==alpharestart GOTO alphastart
if %o%==win GOTO sc2win

:b1
if %z1%==o GOTO spieler2
if %z1%==x GOTO spieler2
set z1=o
goto check2

:b2
if %z2%==o GOTO spieler2
if %z2%==x GOTO spieler2
set z2=o
goto check2

:b3
if %z3%==o GOTO spieler2
if %z3%==x GOTO spieler2
set z3=o
goto check2

:b4
if %z4%==o GOTO spieler2
if %z4%==x GOTO spieler2
set z4=o
goto check2

:b5
if %z5%==o GOTO spieler2
if %z5%==x GOTO spieler2
set z5=o
goto check2

:b6
if %z6%==o GOTO spieler2
if %z6%==x GOTO spieler2
set z6=o
goto check2

:b7
if %z7%==o GOTO spieler2
if %z7%==x GOTO spieler2
set z7=o
goto check2

:b8
if %z8%==o GOTO spieler2
if %z8%==x GOTO spieler2
set z8=o
goto check2

:b9
if %z9%==o GOTO spieler2
if %z9%==x GOTO spieler2
set z9=o
goto check2

:check
cls
if %z1%==x if %z2%==x if %z3%==x GOTO 1w
if %z4%==x if %z5%==x if %z6%==x GOTO 1w
if %z7%==x if %z8%==x if %z9%==x GOTO 1w
if %z1%==x if %z4%==x if %z7%==x GOTO 1w
if %z2%==x if %z5%==x if %z8%==x GOTO 1w
if %z3%==x if %z6%==x if %z9%==x GOTO 1w
if %z1%==x if %z5%==x if %z9%==x GOTO 1w
if %z3%==x if %z5%==x if %z7%==x GOTO 1w
goto spieler2

:check2
cls
if %z1%==o if %z2%==o if %z3%==o GOTO 2w
if %z4%==o if %z5%==o if %z6%==o GOTO 2w
if %z7%==o if %z8%==o if %z9%==o GOTO 2w
if %z1%==o if %z4%==o if %z7%==o GOTO 2w
if %z2%==o if %z5%==o if %z8%==o GOTO 2w
if %z3%==o if %z6%==o if %z9%==o GOTO 2w
if %z1%==o if %z5%==o if %z9%==o GOTO 2w
if %z3%==o if %z5%==o if %z7%==o GOTO 2w
goto spieler1

:1w
color 0c
set/a sc1=%sc1%+1
if %sc1%==5 GOTO sc1win
echo.
echo TIC TAC TOE
echo.
echo.
echo %name1% won the round !
echo.
echo %name1% %sc1% : %sc2% %name2%
echo.
echo.
echo.
pause
set af=2
goto start
:sc1win
cls
color 0e
echo.
echo TIC TAC TOE
echo %sc1% : %sc2%
echo.
echo %name1% won the Match !!!
echo.
echo %date%/%time%
echo.
echo Type in "restart" to restart, "finish" to close the file or
echo "save", to save the results in Tic_tac_toe_log.txt on your desktop.
set/p alphaend=
if %alphaend%==restart GOTO alphastart
if %alphaend%==save GOTO save1
exit
:2w
color 06
set/a sc2=%sc2%+1
if %sc2%==5 GOTO sc2win
echo.
echo TIC TAC TOE
echo.
echo.
echo %name2% won the round !
echo.
echo %name1% %sc1% : %sc2% %name2%
echo.
echo.
echo.
pause
set af=1
goto start
:sc2win
cls
color 0e
echo.
echo TIC TAC TOE
echo %sc1% : %sc2%
echo.
echo %name2% won the Match !!!
echo.
echo %date%/%time%
echo.
echo Type in "restart" to restart, "finish" to close the file or
echo "save", to save the results in Tic_tac_toe_log.txt on your desktop.
set/p alphaend=
if %alphaend%==restart GOTO alphastart
if %alphaend%==save GOTO save2
:alphaend
exit
:save1
echo %name1% has won at the %date% at %time% %sc1% : %sc2% to %name2% in Tic Tac Toe.>> Tic_tac_toe_log.txt
goto sc1win

:save2
echo %name2% has won at the %date% at %time% %sc2% : %sc1% to %name1% in Tic Tac Toe.>> Tic_tac_toe_log.txt
goto sc2win

_Swisscrafter_ (author)2015-10-24

I created this batch code in the last week.....

it's a Tic Tac Toe game (:

sorry, if there are some crazy sentences but i wrote it in german and then translated into english....

just copy the code below and save it as a .bat file.

@echo off
:alphastart
cls
title Tic Tac Toe
set sc1=0
set sc2=0
set af=0
:start
cls
color 0e
set z1=1
set z2=2
set z3=3
set z4=4
set z5=5
set z6=6
set z7=7
set z8=8
set z9=9
if %sc1% GEQ 1 GOTO extra
if %sc2% GEQ 1 GOTO extra
echo.
echo TIC TAC TOE
echo.
echo.
echo Choose a name for Player 1.
echo.
set/p name1=
cls
echo.
echo TIC TAC TOE
echo.
echo.
echo Choose a name for Player 2.
echo.
set/p name2=
cls
:extra

:spieler1a
if %af%==2 GOTO spieler2a
set z1=1
set z2=2
set z3=3
set z4=4
set z5=5
set z6=6
set z7=7
set z8=8
set z9=9
:spieler1
color 0e
cls
echo.
echo TIC TAC TOE
echo %sc1%:%sc2%
echo.
echo %z1% I %z2% I

%z3%
echo -----------
echo %z4% I %z5% I

%z6%
echo -----------
echo %z7% I %z8% I

%z9%
echo.
echo.
echo %name1% sets x.
echo.
echo.
echo Type in "restart" to reset the round or
echo "alpharestart" to restart the file.
set/p x=
if %x%==1 GOTO a1
if %x%==2 GOTO a2
if %x%==3 GOTO a3
if %x%==4 GOTO a4
if %x%==5 GOTO a5
if %x%==6 GOTO a6
if %x%==7 GOTO a7
if %x%==8 GOTO a8
if %x%==9 GOTO a9
if %x%==restart GOTO spieler1a
if %x%==alpharestart GOTO alphastart
if %x%==win GOTO sc1win

:a1
if %z1%==o GOTO spieler1
if %z1%==x GOTO spieler1
set z1=x
goto check

:a2
if %z2%==o GOTO spieler1
if %z2%==x GOTO spieler1
set z2=x
goto check

:a3
if %z3%==o GOTO spieler1
if %z3%==x GOTO spieler1
set z3=x
goto check

:a4
if %z4%==o GOTO spieler1
if %z4%==x GOTO spieler1
set z4=x
goto check

:a5
if %z5%==o GOTO spieler1
if %z5%==x GOTO spieler1
set z5=x
goto check

:a6
if %z6%==o GOTO spieler1
if %z6%==x GOTO spieler1
set z6=x
goto check

:a7
if %z7%==o GOTO spieler1
if %z7%==x GOTO spieler1
set z7=x
goto check

:a8
if %z8%==o GOTO spieler1
if %z8%==x GOTO spieler1
set z8=x
goto check

:a9
if %z9%==o GOTO spieler1
if %z9%==x GOTO spieler1
set z9=x
goto check

:spieler2a
if %af%==1 GOTO spieler1a
set z1=1
set z2=2
set z3=3
set z4=4
set z5=5
set z6=6
set z7=7
set z8=8
set z9=9
:spieler2
color 0e
cls
echo.
echo TIC TAC TOE
echo %sc1%:%sc2%
echo.
echo %z1% I %z2% I

%z3%
echo -----------
echo %z4% I %z5% I

%z6%
echo -----------
echo %z7% I %z8% I

%z9%
echo.
echo.
echo %name2% sets o.
echo.
echo.
echo Type in "restart" to reset the round or
echo "alpharestart" to restart the file.
set/p o=
if %o%==1 GOTO b1
if %o%==2 GOTO b2
if %o%==3 GOTO b3
if %o%==4 GOTO b4
if %o%==5 GOTO b5
if %o%==6 GOTO b6
if %o%==7 GOTO b7
if %o%==8 GOTO b8
if %o%==9 GOTO b9
if %o%==restart GOTO spieler2a
if %o%==alpharestart GOTO alphastart
if %o%==win GOTO sc2win

:b1
if %z1%==o GOTO spieler2
if %z1%==x GOTO spieler2
set z1=o
goto check2

:b2
if %z2%==o GOTO spieler2
if %z2%==x GOTO spieler2
set z2=o
goto check2

:b3
if %z3%==o GOTO spieler2
if %z3%==x GOTO spieler2
set z3=o
goto check2

:b4
if %z4%==o GOTO spieler2
if %z4%==x GOTO spieler2
set z4=o
goto check2

:b5
if %z5%==o GOTO spieler2
if %z5%==x GOTO spieler2
set z5=o
goto check2

:b6
if %z6%==o GOTO spieler2
if %z6%==x GOTO spieler2
set z6=o
goto check2

:b7
if %z7%==o GOTO spieler2
if %z7%==x GOTO spieler2
set z7=o
goto check2

:b8
if %z8%==o GOTO spieler2
if %z8%==x GOTO spieler2
set z8=o
goto check2

:b9
if %z9%==o GOTO spieler2
if %z9%==x GOTO spieler2
set z9=o
goto check2

:check
cls
if %z1%==x if %z2%==x if %z3%==x GOTO 1w
if %z4%==x if %z5%==x if %z6%==x GOTO 1w
if %z7%==x if %z8%==x if %z9%==x GOTO 1w
if %z1%==x if %z4%==x if %z7%==x GOTO 1w
if %z2%==x if %z5%==x if %z8%==x GOTO 1w
if %z3%==x if %z6%==x if %z9%==x GOTO 1w
if %z1%==x if %z5%==x if %z9%==x GOTO 1w
if %z3%==x if %z5%==x if %z7%==x GOTO 1w
goto spieler2

:check2
cls
if %z1%==o if %z2%==o if %z3%==o GOTO 2w
if %z4%==o if %z5%==o if %z6%==o GOTO 2w
if %z7%==o if %z8%==o if %z9%==o GOTO 2w
if %z1%==o if %z4%==o if %z7%==o GOTO 2w
if %z2%==o if %z5%==o if %z8%==o GOTO 2w
if %z3%==o if %z6%==o if %z9%==o GOTO 2w
if %z1%==o if %z5%==o if %z9%==o GOTO 2w
if %z3%==o if %z5%==o if %z7%==o GOTO 2w
goto spieler1

:1w
color 0c
set/a sc1=%sc1%+1
if %sc1%==5 GOTO sc1win
echo.
echo TIC TAC TOE
echo.
echo.
echo %name1% won the

round !
echo.
echo %name1% %sc1%

: %sc2% %name2%
echo.
echo.
echo.
pause
set af=2
goto start
:sc1win
cls
color 0e
echo.
echo TIC TAC TOE
echo %sc1% : %sc2%
echo.
echo %name1% won the

Match !!!
echo.
echo %date%/%time%
echo.
echo Type in "restart" to restart, "finish" to close

the file or
echo "save", to save the results in Tic_tac_toe_log.txt

on your desktop.
set/p alphaend=
if %alphaend%==restart GOTO alphastart
if %alphaend%==save GOTO save1
exit
:2w
color 06
set/a sc2=%sc2%+1
if %sc2%==5 GOTO sc2win
echo.
echo TIC TAC TOE
echo.
echo.
echo %name2% won the

round !
echo.
echo %name1% %sc1% :

%sc2% %name2%
echo.
echo.
echo.
pause
set af=1
goto start
:sc2win
cls
color 0e
echo.
echo TIC TAC TOE
echo %sc1% : %sc2%
echo.
echo %name2% won the

Match !!!
echo.
echo %date%/%time%
echo.
echo Type in "restart" to restart, "finish" to close

the file or
echo "save", to save the results in Tic_tac_toe_log.txt

on your desktop.
set/p alphaend=
if %alphaend%==restart GOTO alphastart
if %alphaend%==save GOTO save2
:alphaend
exit
:save1
echo %name1% has won at the %date% at %time% %sc1% :

%sc2% to %name2% in Tic Tac Toe.>> Tic_tac_toe_log.txt
goto sc1win

:save2
echo %name2% has won at the %date% at %time% %sc2% :

%sc1% to %name1% in Tic Tac Toe.>> Tic_tac_toe_log.txt
goto sc2win

JetBoxOne (author)2015-10-10

Hi Sejma,i really hope you dont mind,but this is more usefull.

I modified your guessing game so that you can choose to restart again or not.

Anyway thanks for passing my time,i was really bored ;).

Here is the new one:

@echo off
:A
ping localhost -n 1 >nul
cls
color 0e
title Guessing Game by seJma.
set /a guessnum=0
set /a answer=%RANDOM%
set variable1=surf33
echo -------------------------------------------------
echo Welcome to the Guessing Game!
echo.
echo Try and Guess my Number!
echo -------------------------------------------------
echo.
:top
echo.
set /p guess=
echo.
if %guess% GTR %answer% ECHO Lower!
if %guess% LSS %answer% ECHO Higher!
if %guess%==%answer% GOTO EQUAL
set /a guessnum=%guessnum% +1
if %guess%==%variable1% ECHO Found the backdoor hey?, the answer is: %answer%
goto top
:equal
echo Congratulations, You guessed right!!!
pause
echo.
echo It took you %guessnum% guesses.
echo.
ping localhost -n 1 >nul
cls
echo -------------------------------------------------
set /p input= Want to try again ? -
echo -------------------------------------------------
if %input%==yes goto A
if %input%==Yes goto A
if %input%==YES goto A
if %input%==no goto B



:B

s_bruno1 (author)2015-10-05

Hi Sejma, hope you don't mind but I have added a little functionality around your guessing game application that gives a user a 20 guess limit which adds to the excitement. Thanks for the tutorials, I was able to do this using knowledge learnt here :)

@echo off

color a

title Guessing Game by seJma. Added functionality added BS3AC 05/10/15

set /a guessnum=0

set /a answer=%RANDOM%

set /a countdown=0

set /a left=21

set variable1=surf33

echo -------------------------------------------------

echo YOU HAVE 20 GUESSES TO FIND THE RANDOM NUMBER

echo.

echo IF YOU FAIL TO GUESS WITHIN 20 SELECTIONS YOU LOSE!!!!

echo -------------------------------------------------

echo.

:top

echo.

set /p guess=

echo.

if %countdown% == 20 GOTO LOST

if %guess% GTR %answer% ECHO Lower!

if %guess% LSS %answer% ECHO Higher!

set /a countdown = %countdown% +1

set /a left = %left% - 1

echo You have %left% guesses remaining..!

echo.

if %guess%==%answer% GOTO EQUAL

set /a guessnum=%guessnum% +1

if %guess%==%variable1% ECHO Found the backdoor hey?, the answer is: %answer%

goto top

:lost

echo Unlucky, you failed to guess within the 20 guess limit. Better luck next time..! :)

echo.

pause

EXIT [/B]

:equal

echo Congratulations, You guessed right!!!

echo.

echo It took you %guessnum% guesses.

echo.

pause

VictorS10 (author)2015-09-12

Nice. btw your smiley is off centered and you can type an actual smiley face like this! ☺

stephen2803 (author)2008-11-02

how do you do the smiley at the end?

VictorS10 (author)stephen28032015-09-12

His smiley is of centered but it is just a bunch of echo commands displaying Asterisk (*) at certain areas on the screen, with a pause command to say Press any Key to Continue. ☺

KoreusZ (author)2013-07-07

How about cluttering the screen with visual basic scripts, that'd look more realistic.

VictorS10 (author)KoreusZ2015-09-12

Yes you can do so with the start command.

VictorS10 (author)2015-09-12

Here is my best batch program:

Happy B-Day Animation.bat

@echo off

color 0a

title Happy B-Day

:note

Start "" "C:\Program Files\Happy B-Day Animation\note.vbs"

ping localhost -n 5 >nul

Start "" "C:\Program Files\Happy B-Day Animation\note2.vbs"

pause

goto main

:main

cls

color 6E

echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²\

echo ²² .-..-. .---. _ .-. .-. .-. .-. ²²

echo ²² : :; : : .; ::_; .' `.: : : : : : ²²

echo ²² : : .--. .---. .---. .-..-. : .'.-..--.`. .': `-. .-' : .--. .-..-.: : ²²

echo ²² : :: :' .; ; : .; `: .; `: :; : : .; :: :: ..': : : .. :' .; :' .; ; : :; ::_; ²²

echo ²² :_;:_;`.__,_;: ._.': ._.'`._. ; :___.':_;:_; :_; :_;:_;`.__.'`.__,_;`._. ;:_; ²²

echo ²² : : : : .-. : .-. : ²²

echo ²² :_; :_; `._.' `._.' ²²

echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²/

ping localhost -n 2 >nul

goto start

:start

cls

color 7F

echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²\

echo ²² .-..-. .---. _ .-. .-. .-. .-. ²²

echo ²² : :; : : .; ::_; .' `.: : : : : : ²²

echo ²² : : .--. .---. .---. .-..-. : .'.-..--.`. .': `-. .-' : .--. .-..-.: : ²²

echo ²² : :: :' .; ; : .; `: .; `: :; : : .; :: :: ..': : : .. :' .; :' .; ; : :; ::_; ²²

echo ²² :_;:_;`.__,_;: ._.': ._.'`._. ; :___.':_;:_; :_; :_;:_;`.__.'`.__,_;`._. ;:_; ²²

echo ²² : : : : .-. : .-. : ²²

echo ²² :_; :_; `._.' `._.' ²²

echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²/

ping localhost -n 2 >nul

goto a

:a

cls

color 19

echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²\

echo ²² .-..-. .---. _ .-. .-. .-. .-. ²²

echo ²² : :; : : .; ::_; .' `.: : : : : : ²²

echo ²² : : .--. .---. .---. .-..-. : .'.-..--.`. .': `-. .-' : .--. .-..-.: : ²²

echo ²² : :: :' .; ; : .; `: .; `: :; : : .; :: :: ..': : : .. :' .; :' .; ; : :; ::_; ²²

echo ²² :_;:_;`.__,_;: ._.': ._.'`._. ; :___.':_;:_; :_; :_;:_;`.__.'`.__,_;`._. ;:_; ²²

echo ²² : : : : .-. : .-. : ²²

echo ²² :_; :_; `._.' `._.' ²²

echo ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²/

ping localhost -n 2 >nul

goto main

note.vbs

X=msgbox ("To end the program click the red x at the top right hand side of the frame. Also if you wan't a special version of this just comment to me where you got the program.",0,"Note")

Note2.vbs

X=msgbox ("Version 1.0.0.1 of Happy B-Day Animation * Click OK to continue then press any key to continue.",0,"Note")

Happy B-Day Animation.lnk

@echo off

color 0a

title Happy B-Day

:note

Start "" "C:\Program Files\Happy B-Day Animation\note.vbs"

ping localhost -n 5 >nul

Start "" "C:\Program Files\Happy B-Day Animation\note2.vbs"

pause

goto main

:main

cls

color 6E

echo 께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께\

echo 께 .-..-. .---. _ .-. .-. .-. .-. 께

echo 께 : :; : : .; ::_; .' `.: : : : : : 께

echo 께 : : .--. .---. .---. .-..-. : .'.-..--.`. .': `-. .-' : .--. .-..-.: : 께

echo 께 : :: :' .; ; : .; `: .; `: :; : : .; :: :: ..': : : .. :' .; :' .; ; : :; ::_; 께

echo 께 :_;:_;`.__,_;: ._.': ._.'`._. ; :___.':_;:_; :_; :_;:_;`.__.'`.__,_;`._. ;:_; 께

echo 께 : : : : .-. : .-. : 께

echo 께 :_; :_; `._.' `._.' 께

echo 께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께/

ping localhost -n 2 >nul

goto start

:start

cls

color 7F

echo 께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께\

echo 께 .-..-. .---. _ .-. .-. .-. .-. 께

echo 께 : :; : : .; ::_; .' `.: : : : : : 께

echo 께 : : .--. .---. .---. .-..-. : .'.-..--.`. .': `-. .-' : .--. .-..-.: : 께

echo 께 : :: :' .; ; : .; `: .; `: :; : : .; :: :: ..': : : .. :' .; :' .; ; : :; ::_; 께

echo 께 :_;:_;`.__,_;: ._.': ._.'`._. ; :___.':_;:_; :_; :_;:_;`.__.'`.__,_;`._. ;:_; 께

echo 께 : : : : .-. : .-. : 께

echo 께 :_; :_; `._.' `._.' 께

echo 께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께/

ping localhost -n 2 >nul

goto a

:a

cls

color 19

echo 께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께\

echo 께 .-..-. .---. _ .-. .-. .-. .-. 께

echo 께 : :; : : .; ::_; .' `.: : : : : : 께

echo 께 : : .--. .---. .---. .-..-. : .'.-..--.`. .': `-. .-' : .--. .-..-.: : 께

echo 께 : :: :' .; ; : .; `: .; `: :; : : .; :: :: ..': : : .. :' .; :' .; ; : :; ::_; 께

echo 께 :_;:_;`.__,_;: ._.': ._.'`._. ; :___.':_;:_; :_; :_;:_;`.__.'`.__,_;`._. ;:_; 께

echo 께 : : : : .-. : .-. : 께

echo 께 :_; :_; `._.' `._.' 께

echo 께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께께/

ping localhost -n 2 >nul

goto main

Batchcc (author)2015-09-05

More cool codes here

https://www.instructables.com/member/batchcc

Full screen matrix and more

FredrikC1 (author)2015-08-12

@echo off

TITLE BAT TEMPLATE

:menu

cls

echo.

echo.

echo.

echo BAT TEMPLATE

echo.

echo.

echo ------------------------------

echo.

echo [1] = alternative 1

echo [2] = alternative 2

echo [3] = alternative 3

echo [4] = alternative 4

echo [5] = alternative 5

echo [6] = alternative 6

echo [7] = alternative 7

echo [8] = alternative 8

echo [9] = alternative 9

echo [0] = exit

echo.

echo -----------------------------

set /p op=Choose option hit enter:

if %op%==1 goto 1

if %op%==2 goto 2

if %op%==3 goto 3

if %op%==4 goto 4

if %op%==5 goto 5

if %op%==6 goto 6

if %op%==7 goto 7

if %op%==8 goto 8

if %op%==9 goto 9

if %op%==0 goto exit

goto fail

:1

cls

pause

goto menu

:2

cls

pause

goto menu

:3

cls

pause

goto menu

:4

cls

pause

goto menu

:5

cls

pause

goto menu

:6

cls

pause

goto menu

:7

cls

pause

goto menu

:8

cls

pause

goto menu

:9

cls

pause

goto menu

:fail

cls

goto menu

:exit

exit

extremeseeker (author)2011-11-27

Wait,how do you attach the password protector to a file?

maybe, he is using code like this, after the password correct, maybe he will type start cd c:\path\path\path

joeriev (author)extremeseeker2015-06-14

you can't only if you convert it to .exe it is more difficult to read the code

Jonathan HarenoK (author)2015-08-05

thank you

Jonathan HarenoK (author)2015-08-05

maybe, just add some wait time, don't use pause, because the victim will know that a prank, maybe just add like ping localhost -n 2 >nul.

Martin JiřiG (author)2015-07-13

PiyushB3 (author)2015-06-30

SaarishtT (author)2015-06-20

Hey guys I have made an OS(well as it runs on windows, a shell) using batch.
Check it out @ "http://sourceforge.net/p/jixos/"

Hacker2099 (author)2015-05-27

ds

Hacker2099 (author)2015-05-27

I Make a Rainbow matrix!!!

Check it out:

@echo off

:LOADING

cls

echo Processing.

ping localhost -n 2 >nul

cls

echo Processing..

ping localhost -n 2 >nul

cls

echo Processing...

ping localhost -n 2 >nul

cls

echo Loading....

ping localhost -n 2 >nul

cls

echo Starting.....

ping localhost -n 2 >nul

ping localhost -n 2 >nul

cls

color 0a

echo What do you want to do? Enter your choice

echo 1) Make a matrix falling efect

set/p c=

if %c%==1 goto MATRIX

:MATRIX

cls

echo What colour you want?

echo 1) RAINBOW

echo 2) Red

echo 3) Blue

echo 4) Purple

set/p ch=

if %ch%==1 goto GREEN

if %ch%==2 goto RED

if %ch%==3 goto BLUE

if %ch%==4 goto PURPLE

:GREEN

color 02
color 04
color 01
color 03
color 06
color 07
color 08
color 09
color 05
set a=67841350137489528937018256781344

echo %a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%

goto GREEN

:RED

color 04

set a=67841350137489528937018256781344

echo %a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%

goto RED

:BLUE

color 01

set a=67841350137489528937018256781344

echo %a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%

goto BLUE

:PURPLE

color 05

set a=67841350137489528937018256781344

echo %a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%

goto PURPLE

Hacker2099 (author)2015-05-27

LoganG2 (author)2015-04-08

the virus is lagit my computer shut down when i tested it

About This Instructable

420,877views

59favorites

License:

More by Sejma:Very Basic Batch TutorialNot So Basic Batch TutorialSome Cool Batch Applications
Add instructable to: