How to Protect a Folder on Windows Without Using Any Software
Open Notepad., Copy-Paste the below link into the window: cls @ECHO OFF if EXIST "Control Panel., Save the file., Change the type to All Files., Open the file you just created., Double click on the .bat file again the folder., Congratulations!
Step-by-Step Guide
-
Step 1: Open Notepad.
This can be done by clicking on the Start Menu, clicking run and typing notepad. -
Step 2: Copy-Paste the below link into the window: cls @ECHO OFF if EXIST "Control Panel.
{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST MyFolder goto MDMyFolder :
CONFIRM echo Are you sure to lock this 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 MyFolder "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 Your Secure Folder set/p "pass=>" if NOT %pass%== LifeGuide Hub goto FAIL attrib
-h
-s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder echo Folder Unlocked successfully goto End :
FAIL echo Invalid password goto end :
MDMyFolder md MyFolder echo MyFolder created successfully goto End :
End , Go to the top bar and click file, the click Save As... , Then name the file protect.bat and save the file.
The file extension must be .bat for this method to work. , A new folder will be created.
Move all the files you wish to protect into that folder. , The password is LifeGuide Hub.
To change the password, right click the .bat file and click edit.
Then change the LifeGuide Hub to your own password. , You now can lock a folder without any special third party software! -
Step 3: Save the file.
-
Step 4: Change the type to All Files.
-
Step 5: Open the file you just created.
-
Step 6: Double click on the .bat file again the folder.
-
Step 7: Congratulations!
Detailed Guide
This can be done by clicking on the Start Menu, clicking run and typing notepad.
{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST MyFolder goto MDMyFolder :
CONFIRM echo Are you sure to lock this 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 MyFolder "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 Your Secure Folder set/p "pass=>" if NOT %pass%== LifeGuide Hub goto FAIL attrib
-h
-s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder echo Folder Unlocked successfully goto End :
FAIL echo Invalid password goto end :
MDMyFolder md MyFolder echo MyFolder created successfully goto End :
End , Go to the top bar and click file, the click Save As... , Then name the file protect.bat and save the file.
The file extension must be .bat for this method to work. , A new folder will be created.
Move all the files you wish to protect into that folder. , The password is LifeGuide Hub.
To change the password, right click the .bat file and click edit.
Then change the LifeGuide Hub to your own password. , You now can lock a folder without any special third party software!
About the Author
Theresa Simmons
Writer and educator with a focus on practical home improvement knowledge.
Rate This Guide
How helpful was this guide? Click to rate: