Intro: Making a Locker Batch File.
This is a really simple project you should try for fun.
Step 1: Use a Text Editor.
You should be using a text editor, you don't have to though.
If you need one download Notepad++ here.
Step 2: Start New.
Lets make a new file for a clean page. If you don't know how look at picture.
Step 3: Write It Out
You will never learn how to do things on your own by copy pasting.
But If you are not willing to write it out here.
@ECHO OFF title Folder Private if EXIST "HTG Locker" 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 "HTG Locker" attrib +h +s "HTG Locker" echo Folder locked goto End :UNLOCK echo Enter password to unlock folder set/p "pass=>" if NOT %pass%== bracheps goto FAIL attrib -h -s "HTG Locker" ren "HTG Locker" Private echo Folder Unlocked successfully goto End :FAIL echo Invalid password goto end :MDLOCKER md Private echo Private created successfully goto End :End
Step 4: Need More Help?
If you want more help on batch programming, check out this out.