Home 0P3N Blog 7 Steps to Lock a Folder (Plus a BONUS)
Ready to Start Your Career?
Create Free Account
orion s profile image
By: orion
July 20, 2015

7 Steps to Lock a Folder (Plus a BONUS)

By: orion
July 20, 2015
orion s profile image
By: orion
July 20, 2015

7 Steps to Lock a Folder (Plus a Bonus) - Cybrary

7 Steps to Locking a Folder (Plus a BONUS)

1.Open Notepad. Copy and paste the code below:

cls

@ECHO OFFtitle hackingif EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" gotoUNLOCKif NOT EXIST MyFolder goto MDMyFolder:CONFIRMecho Are you sure to lock this folder? (Y/N)set/p "cho=>"if %cho%==Y goto LOCKif %cho%==y goto LOCKif %cho%==n goto ENDif %cho%==N goto ENDecho Invalid choice.goto CONFIRM:LOCKren MyFolder "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"echo Folder lockedgoto End:UNLOCKecho Enter password to Unlock Your Secure Folderset/p "pass=>"if NOT %pass%== coolhacks goto FAILattrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolderecho Folder Unlocked successfullygoto End:FAILecho Invalid passwordgoto end:MDMyFoldermd MyFolderecho MyFolder created successfullygoto End:End 2.Save the Notepad file as lock.bat (.bat extension is a must).3. Double-click the lock.bat file and a folder called "MyFolder" will be created.4. Copy the data you wish to secure into "MyFolder".5. Double-click the lock.bat file again and when the tcommand prompt appears, type "Y" and press Enter.6. "MyFolder" will remain hidden from view and to access it, double-click lock.bat file.7. You'll be prompted for a password. The default password is coolhacks. To change the password replace coolhacks with new password in the above code. BONUS: More Folder SecurityYou may be thinking that anyone could access the password by opening that lock.bat file in Notepad or any other text editor. To make this folder more secure, hide the lock.bat file in a highly secure location after following the above tutorial.Then, to access the secured file double click on the lock.bat file. Consider copying the lock.bat file into a Pendrive and then copying it onto your computer whenever you need access to your protected files.
Schedule Demo

Build your Cybersecurity or IT Career

Accelerate in your role, earn new certifications, and develop cutting-edge skills using the fastest growing catalog in the industry