Password Protect a Folder in Windows 10 without using any Additional Software
Everyone has some persnal and confidential information which he he/she does not want to share with other people. In our computer there are some very confidential files also. To hide these files we generally use some third party softwares. But in this article, I will tell you a trick that will help you lock and hide any folder without installing any third-party software. With just a simple .bat file, you can protect your folders easily. Whenever you want to open the protected folder, a password will be required before the folder becomes visible and accessible. So, without further delay, follow the steps given below to password protect a folder :
- First of all, open the folder you want to secure with a password. You can see in the below animation that I’ve created a folder named “Test,” which consists of an image and an HTML file.
- Now, create a new text file inside the same folder. You can name the text file according to your choice. I’m naming it “lockFolder.txt.”
- Copy the following code and paste it into the text file that you’ve created in the 2nd Step.
@ECHO OFF if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST Private goto MDPrivate :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 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 Your Secure Folder set/p "pass=>" if NOT %pass%== YOUR-PASSWORD 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 :MDPrivate md Private echo Private created successfully goto End :End
- Now, open the text file and move your cursor to line number 21(if NOT %pass%== YOUR-PASSWORD goto FAIL). Replace YOUR-PASSWORD with the password of your choice. In the below animation, you can see that I’ve used “Password” as my password.
- Now, click on the File option in the top left corner. Click on the Save as button and save the file as “lockFolder.bat.”
- Now, double click on the “lockFolder.bat,” and a folder named “Private” will be created automatically.
- Move all the files you want to hide inside the Private folder that we’ve just created in the step 6.
- Again double click on the “lockFolder.bat” A command prompt window will open asking you that “Are you sure you want to lock this folder?”. Type 'Y' and hit enter to confirm.
- Once you hit enter, your Private folder will be automatically hidden, and only lockFolder.bat will be visible to you.
- To open your secured folder, double click on the lockFolder.bat file. A command prompt window will open asking you the password of the secured folder.(In our case it is 'Password')
- Type the password and hit enter. Once you do that, your hidden folder will be displayed to you successfully.
- If you want to hide your Private folder again, all you need to do is double-click on the “lockFolder.bat” file again.
So that’s how you can easily hide your private files without using any additional software.
Comments
Post a Comment