Instructables
loading
loading
Picture of Some Cool Batch Applications
lets get busy.bmp
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.
 
Remove these adsRemove these ads by Signing Up

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.
1-40 of 136Next »
PiyushB34 days ago
SaarishtT13 days ago

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/"

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

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

Hacker20991 month ago

ds

Hacker20991 month ago

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

Hacker20991 month ago
LoganG22 months ago

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

The .bat file tells you computer to shut down. I does not do anything harmful

ammad27k3 months ago

why this condition always be true even i enter wrong password why it happens

Guys :-D!! i made this sick cool exe file :-D i promise you, its so good you want to laugh ;-P, check it out here: http://tinyurl.com/pnnb5p6 i promise!!

goodduck45 months ago

@echo off

mode 1000

echo If you are epileptic please click the red X in the corner, or well die...

PING 1.1.1.1 -n 1 -w 3.5 >NUL

cls

echo Really you have been warned...

PING 1.1.1.1 -n 1 -w 1.5 >NUL

cls

:StopReadingTheCodeAndTestItOut

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

color 0a

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

color 0b

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

color 0c

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

color 0d

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

color 0e

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

color 0

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

goto StopReadingTheCodeAndTestItOut

pause

ThomasB96 months ago

I made one that saves your password (the user can choose the password).

tabepic.wix.com/smartcrewhub

TomB67 months ago

Here is a better password protected folder (open it first) you might wanna change the password though, right now look for ENTERPASSWORDHERE:

cls

@ECHO OFF

title Folder Private

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK

if NOT EXIST Private goto MDLOCKER

:CONFIRM

echo Are you sure you want to lock the folder(Y/N)

set/p "cho=>"

if %cho%==Y goto LOCK

if %cho%==y goto LOCK

if %cho%==n goto END

if %cho%==N goto END

echo Invalid choice.

goto CONFIRM

:LOCK

ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

echo Folder locked

goto End

:UNLOCK

echo Enter password to unlock folder

set/p "pass=>"

if NOT %pass%== ENTERPASSWORDHERE goto FAIL

attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private

echo Folder Unlocked successfully

goto End

:FAIL

echo Invalid password

goto end

:MDLOCKER

md Private

echo Private created successfully

goto End

:End

ashuchok1 year ago
Would you please try this? I want to thank you... This code has created by me....
https://www.facebook.com/shuchokbd

@echo off
echo Thank You Very Much...
echo.
echo Please, Press Enter Rapidly!!!
pause>null
echo.
:start
color 0e
pause>null
color 0a
pause>null
color 0d
pause>null
goto start

why the pauses? why not just let it be automatic?

ReSProgrammer8 months ago

Enter to the folder protector as a password: 1==1 goto correct & if 1

The folder password thing doesn't work, it only blocks like one or two folders.

dos.luke11 months ago

your guys's posts are cool, but for over 1100 lines of code and 50+ added commands, dl at cCMDs-dl.webs.com

drakocasper11 months ago

nice2 smile

lsharma21 year ago

try this code and please open it fullscreen

@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) Green (recommended)

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

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

mikey45021 year ago

This is a batch file which makes it look like you have been hacked by anonymous

P.S. shutdown -a is optional

@echo off

color 02

:loop

ping -n 2 127.0.0.1>nul

echo KNOWLEDGE IS FREE!

ping -n 2 127.0.0.1>nul

echo 5

ping -n 2 127.0.0.1>nul

echo 4

ping -n 2 127.0.0.1>nul

echo 3

ping -n 2 127.0.0.1>nul

echo 2

ping -n 2 127.0.0.1>nul

echo 1

ping -n 2 127.0.0.1>nul

color 04

echo !!!!!

color 04

@echo off

:tricks

echo ERROR - PC HAS BEEN HACKED

color 04

Shutdown -R -t 30 -c "We Are Anonymous. We Are Legion. We Do Not Forgive. We Do Not Forget. Expect Us!"

ping 127.0.0.1 -n 7 -w 1000

shutdown -a

pause

Exit

angusPROD2 years ago
its a secure password system that you enter digit by digit
The abort code and password is 1335
Abort code is typed all in one go

***************************
@echo off
title Secure Password
:passeword
Echo password required
set /p CH=
if "%CH%"=="1" goto 1perfect
if not "%CH%"=="1" goto wrong1
:wrong1
Echo wrong
ECho 2 attempts remaining
pause
goto passeword1
:1perfect
Echo Next
set /p QP=
if "%QP%"=="3" goto 3perfect
if not "%QP%"=="3" goto wrong1
:3perfect
Echo next
set /p AD=
If "%AD%"=="3" goto 5perfect
if not "%AD%"=="3" goto wrong1
:5perfect
Echo final one
set /p DM=
if "%DM%"=="5" goto complete
if not "%DM%"=="5" goto wrong1
:passeword1
Echo 2 Attempts remaining
Echo password required
set /p CH=
if "%CH%"=="1" goto 1
if not "%CH%"=="1" goto wrong2
:wrong2
Echo wrong
ECho 1 attempt remaining
Echo Failure to get password
Echo will result in a shutdown
pause
goto passeword2
:1
Echo Next
set /p QP=
if "%QP%"=="3" goto 3
if not "%QP%"=="3" goto wrong2
:3
Echo next
set /p AD=
If "%AD%"=="3" goto 5
if not "%AD%"=="3" goto wrong2
:5
Echo final one
set /p DM=
if "%DM%"=="5" goto complete
if not "%DM%"=="5" goto wrong2
:passeword2
Echo password required
set /p CH=
if "%CH%"=="1" goto 1final
if not "%CH%"=="1" goto wrong3
:wrong3
Echo You have failed to guess the password
ECho You now have 30 seconds to enter the abort code
Echo It is the same as the password
shutdown /s /t 30
Echo **********
set /p SD=
if "%SD%"=="1335" goto abort
if not "%SD%"=="1335" goto end
pause
goto passeword2
:1final
Echo Next
set /p QP=
if "%QP%"=="3" goto 3final
if not "%QP%"=="3" goto wrong3
:3final
Echo next
set /p AD=
If "%AD%"=="3" goto 5final
if not "%AD%"=="3" goto wrong3
:5final
Echo final one
set /p DM=
if "%DM%"=="5" goto complete
if not "%DM%"=="5" goto wrong3
:complete
Echo You made it this far
Echo 1335
Echo Now enter a directory and its ready
Echo made by angusPROD
pause
exit
:abort
shutdown /a
Echo Shutdown aborted
goto passeword2
:end
Echo Goodbye
pause
Exit

THIS IS AN EDIT I MADE OF angusPROD.
@echo off

title Secure Password @EDIT BY H.GADE. MAIN CREATOR AngusPROD.

:passeword

cls

echo. NOTE! Code is 1335

Echo Password required

CHOICE /C 123456789 /N >nul

If "%errorlevel%"=="1" (GOTO :1perfect)

If NOT "%errorlevel%"=="1" (GOTO :wrong1)

:1perfect

cls

Echo Next

CHOICE /C 123456789 /N >nul

If "%errorlevel%"=="3" (GOTO :3perfect)

If NOT "%errorlevel%"=="3" (GOTO :wrong1)

:3perfect

cls

Echo Next

CHOICE /C 123456789 /N >nul

If "%errorlevel%"=="3" (GOTO :5perfect)

If NOT "%errorlevel%"=="3" (GOTO :wrong1)

:5perfect

cls

Echo Final Digit

CHOICE /C 123456789 /N >nul

If "%errorlevel%"=="5" (GOTO :complete)

If NOT "%errorlevel%"=="5" (GOTO :wrong1)

:wrong1

Echo. Wrong. You will have to wait 30 seconds.

Echo.

timeout -T 30 /NOBREAK >nul

(GOTO :passeword)

:passeword1

Echo 2 Attempts remaining

Echo password required

set /p CH=

if "%CH%"=="1" goto 1

if not "%CH%"=="1" goto wrong2

:wrong2

Echo wrong

ECho 1 attempt remaining

Echo Failure to get password

Echo will result in a shutdown

pause

goto passeword2

:1

Echo Next

set /p QP=

if "%QP%"=="3" goto 3

if not "%QP%"=="3" goto wrong2

:3

Echo next

set /p AD=

If "%AD%"=="3" goto 5

if not "%AD%"=="3" goto wrong2

:5

Echo final one

set /p DM=

if "%DM%"=="5" goto complete

if not "%DM%"=="5" goto wrong2

:passeword2

Echo password required

set /p CH=

if "%CH%"=="1" goto 1final

if not "%CH%"=="1" goto wrong3

:wrong3

Echo You have failed to guess the password

ECho You now have 30 seconds to enter the abort code.

Echo It is the same as the password

shutdown /s /t 30

Echo **********

set /p SD=

if "%SD%"=="1335" goto abort

if not "%SD%"=="1335" goto end

pause

goto passeword2

:1final

Echo Next

set /p QP=

if "%QP%"=="3" goto 3final

if not "%QP%"=="3" goto wrong3

:3final

Echo next

set /p AD=

If "%AD%"=="3" goto 5final

if not "%AD%"=="3" goto wrong3

:5final

Echo final one

set /p DM=

if "%DM%"=="5" goto complete

if not "%DM%"=="5" goto wrong3

:complete

Echo You made it this far

Echo Now enter a directory and its ready

echo.

echo.

Echo. Made by angusPROD

echo. Edit by H.Gade

echo.

Echo. Editor Above took this batch to a whole new level.

echo. Thank you for Trying out this batch.

echo.

pause >nul

exit

:abort

shutdown /a

Echo Shutdown aborted

goto passeword2

:end

Echo Goodbye

pause

Exit

marmig04041 year ago
I like your version but i have made my own.
anyone can check it out if they want but please give credit when sharing. Thank you!

@echo off
title Calculator
color 0a
echo Welcome to The Basic Arithmetic Calculator
echo Made By Martin Miglio
ping localhost -n 3 >nul

:LOADING
cls
echo Loading.
ping localhost -n 2 >nul
cls
echo Loading..
ping localhost -n 2 >nul
cls
echo Loading...
ping localhost -n 2 >nul
cls
echo Loading....
ping localhost -n 2 >nul
cls
echo Loading.....
ping localhost -n 2 >nul
ping localhost -n 2 >nul
color 0a

:START
cls
echo What Type of Math would you like to do?
echo Add, Subtract, Multiply, or Divide.
set /p math=
IF '%math%' == 'Add' GOTO ADD
IF '%math%' == 'add' GOTO ADD
IF '%math%' == 'Subtract' GOTO SUB
IF '%math%' == 'subtract' GOTO SUB
IF '%math%' == 'Multiply' GOTO MULTIPLY
IF '%math%' == 'multiply' GOTO MULTIPLY
IF '%math%' == 'Divide' GOTO DIVIDE
IF '%math%' == 'divide' GOTO DIVIDE
Exit

:ADD
Cls
GOTO NUMBERSADD
pause
exit

:SUB
Cls
GOTO NUMBERSSUB
pause
exit

:MULTIPLY
Cls
GOTO NUMBERSMULTIPLY
pause
exit

:DIVIDE
Cls
GOTO NUMBERSDIVIDE
pause
exit

:NUMBERSADD
echo What is the First Number you would like to Add?
set /p number1=
cls
echo What is the Second Number you would like to Add?
set /p number2=
cls

GOTO ADD2
exit

:NUMBERSSUB
echo What is the First Number you would like to Subtract?
set /p number1=
cls
echo What is the Second Number you would like to Subtract?
set /p number2=
cls
GOTO SUB2
exit

:NUMBERSMULTIPLY
echo What is the First Number you would like to Multiply?
set /p number1=
cls
echo What is the Second Number you would like to Multiply?
set /p number2=
cls
GOTO MULTIPLY2
exit

:NUMBERSDIVIDE
echo What is the First Number you would like to Divide?
set /p number1=
cls
echo What is the Second Number you would like to Divide?
set /p number2=
cls
GOTO DIVIDE2
exit

:ADD2
Set /A result = %number1% + %number2%
echo The answer is %result%.
Pause
GOTO START
exit

:SUB2
Set /A result = %number1% - %number2%
echo The answer is %result%.
pause
GOTO START
exit

:MULTIPLY2
Set /A result = %number1% * %number2%
echo The answer is %result%.
pause
GOTO START
exit

:DIVIDE2
Set /A result = %number1% / %number2%
echo The answer is %result%.
pause
GOTO START
exit




fin
X_STOP_X2 years ago
this is a folder lock that does hide the folder
cls
@ECHO OFF
title Folder Confidential
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Confidential goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Confidential "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter the Password to unlock folder
set/p "pass=>"
if NOT %pass%== Passwords are hard to crack goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Confidential
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md confidential
echo Confidential created successfully
goto End
:End
@ECHO OFF
title Folder Confidential

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Confidential goto MDLOCKER


:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Confidential "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter the Password to unlock folder
set/p "pass=>"
If %pass%==Password GOTO test
if NOT %pass%==Password goto FAIL
:test
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Confidential
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md confidential
echo Confidential created successfully
goto End
:End

I correct your code
Joe Diffie1 year ago
That's pretty cool stuff!
I'm working on a forum where I need to do just 2 simple math problems.

Var/.4 =x and var/.6=x

I don't know what the rise in the number by .4 and .6 actually really does for the company but that's the way they want it.

does anyone know how to build an easy app for that.
just 3 text boxes. one for entering an amount and an enter button that does the math and enters that data in the .4 and .6 math answers text boxes simultaneously.
They don't even need to be labeled.
KoreusZ1 year ago
How about cluttering the screen with visual basic scripts, that'd look more realistic.
Wookie1232 years ago
Free maintenance batch for Windows, just uses utilities built into windows 7 and 8, with 1-click action. Has an installer though. Cleans, defrags, disk checks, updates, checks for malware...etc. User is free to edit it for personal use, make it better...etc :)

OnceOver Maintenance Batch
www.freeOMB.com
g3lrod2 years ago
Put this in for a nice little password protect:

Set /a try=0

:begin
set /a try=%try%+1
If %try%==4 GOTO die
Echo Enter your password:
Echo.
Set /p pass="-->"

If %pass%==**PASSWORD** GOTO correct
GOTO begin

:die
Echo Too many incorrect tries
rem (Put some form of punishment here)

:correct

rem Your main code
STEDZ2 years ago
@Win7Maniacwhat do you mean by "this sets off the internal alarm in XP and maybe Vista" and what's an"internal alarm"?
g3lrod STEDZ2 years ago
I believe that is the motherboard beeper.
emuman4evr6 years ago
Anyone know the command that saves a list of all the files on a hard drive? I want it to basically save the hdd's file tree as a .txt document with the name of the computer and the date in the filename.
This should work:

TREE C:\ > "Tree.txt"

Then you can either find the file and open it or type in:

START Tree.txt

And then you can either find the file and copy it's contents and then delete it manually OR:

DEL Tree.txt

All of that should work
samkai4 years ago
how do you times, plus, and all that?
The operators in batch scripts are the following:

+ Addition
- Subtration
* Multiplication
/ Division
% Modulus (use %% in batch scripts)
>> and & Bitwise operators
() Grouping
! ~ Unary operators
= *= /= %= += -= &= ^= |= <<= >>= assignment

For more information type "SET /?" in your command prompt.
@Sejma if you want to carry a message through you must first put echo before it or else cmd will recognize it as an automated command input and you will get a crapload of errors. it will say:

"put message here" is not recognized as an internal or external command or a batch file.

just a little warning for the future
Really? Come on? Did you even look at the code?
el-xavi262 years ago
Hey I have seen you have a lot of knowledge in batching. Can you please explain how to add points(numbers) to a amount of points
1-40 of 136Next »