Let’s admit it: we all have certain files on our computer we don’t want anyone to access.

How many times have we wondered if we could protect these files from our nosy family members with a password so that no one can access it except us?

Thankfully, Windows provides you with the freedom to keep certain files hidden from the outside world in a secret folder that is password protected.

No, you don’t need to buy additional software to do that.

Disclaimer: We have tested this method of password protecting a folder internally, and it worked for us. However, to be on the safer side, we highly recommend you conduct a trial run by password locking a few dummy files first. Also, note down your password somewhere safely. If you forget the password, your files will be gone permanently!

Password protecting a folder in Windows 10

  1. To begin with, open the folder where your important files are located. This folder could be located anywhere, even on your desktop.
    step 1 - open the folder where your important files are located
  2. Right, click inside the folder. This will open a contextual menu. Click on New.
    step 2 - Right, click inside the folder. This will open a contextual menu. Click on New.
  3. Next, click on Text Document.
    step 3 - click on Text Document.
  4. This will create a new text file. Press Enter. You can choose to rename this file. This file can be deleted once you have created the lockable folder for you.
    step 4 - Press Enter. You can choose to rename this file
  5. Next, double click on this text file and open it.
    step 5 - double click on this text file and open it
  6. Copy the piece of code given below, and paste it inside the file.
    step 6 - Copy the piece of code given below, and paste it inside the file
cls
@ECHO OFF
title Folder Locker
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u 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 Locker “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 folder
set/p “pass=>”
if NOT %pass%==Your-Password-Here goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
  • Hit Ctrl + F to find the line where it says ‘Your-Password-Here’ in the text file.
    step 7 -Hit Ctrl + F to find the line where it says ‘Your-Password-Here’ in the text file.
  • Replace this phrase with a strong password of your choice. Don’t forget to note it down somewhere as this password will be used to unlock the folder later on.
    step 8 - Replace this phrase with a password of your choice
  • Click on File > Save As
    step 9 - Click on File > Save As…
  • Change the file type to All Files and save the file with the name FolderLocker.bat
  • Click on Save. This will create a FolderLocker.
    step 11 - Click on Save. This will create a FolderLocker.
  • Now, simply move the files that you want to hide from others in this folder.
    step 12 - move the files that you want to hide from others in this folder
  • Next, open the FolderLocker file, and type Y.
  • Hit Enter, and this will close the FolderLocker file, thus password protecting all your files.
  • To unlock the folder, double click on FolderLocker.
    To unlock the folder, double click on FolderLocker
  • You will be asked to provide your password. Type your password and hit Enter.
  • If your password is correct, you will be able to find all the hidden files. After accessing them, you can choose to lock them again by repeating the same process again.

How to secure your files and folders on the computer

1. Protect your data from an outside attack

Data gets lost, and it is important to ensure proper safety of your files to prevent such events from happening.

One great way to keep your files secure is by using a good VPN (Virtual Private Network). The software creates a private network for you virtually so that all your web traffic is routed through a secure tunnel with proper end-to-end encryption. This ensures that none of your information gets into the wrong hands.

In addition to having a VPN, it is also recommended to have reliable anti-virus software and to keep it updated.

2. Keep your OS updated

We all are guilty of postponing important software updates. Get over this habit, and make sure that your operating system is updated and in line with the recent versions.

This is because the latest updates often include patches and fixes that keep your files and folders safe and secure from the latest threats.

3. Back up your personal data

Develop a habit of backing up your data at least once a week. You can also choose to keep your files on the cloud. This way, even if you lose them on your computer, you can still retrieve them from the cloud.

You could also choose to back up your operating system and programs at least once a month. Thus, even if you somehow lose your data, you will still be able to restore all the important stuff on the go.

The entire process of creating periodic backups might sound like a big hassle at first, but it is well worth it.

4. Use encrypting software

Although the steps mentioned above are easy to follow. However, if they sound too technical for you, you can purchase an encryption software like Wise Folder Hider or SpyHunter to keep your files and folders protected!

With the ever-rising cyber threats and crimes, it is essential to play it smart. Make use of the tips we discussed above, and stay safe on the go.

Recommended reads:

Best VPN for Windows