Making a Locker Batch File.
by LusoFeaz in Circuits > Computers
1086 Views, 12 Favorites, 0 Comments
Making a Locker Batch File.
This is a really simple project you should try for fun.
Use a Text Editor.
You should be using a text editor, you don't have to though.
If you need one download Notepad++ here.
Start New.
Lets make a new file for a clean page. If you don't know how look at picture.
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.
cls
@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
Need More Help?
If you want more help on batch programming, check out this out.