How to Create a Secured and Locked Folder in Windows 10

create-secured-locked-folder-windows-10-featured-image

When you share a computer with someone, there is always a risk of human error—the unintentional deletion of an important file, the incorrect editing of a sensitive file, the accidental sharing of a private folder, etc.

Sometimes you are your own worst enemy Sharing confidential information by email with the wrong recipients is an unfortunate, if not, entirely too frequent, cause of data breaches.

One way to deal with these risks is to provide codes to your most important files, one-by-one. Sharing a computer becomes a worry-free scenario after that, and sending email attachments would be less of an anxiety-inducing experience. And while the requirement to enter a password every time you open the file can slow you down a little, the peace of mind is absolutely worth it. Just remember to use strong passwords all the time.

How To Lock a Folder With a Password in Windows 10

1. Right-click inside the folder where the files you want to protect are located. The folder you want to hide can even be on your desktop.

create-secured-locked-folder-windows-10-right-click-on-a-folder

2. Select “New” from the contextual menu.

create-secured-locked-folder-windows-10-go-to-new

3. Click on “Text Document.”

create-secured-locked-folder-windows-10-new-text-document

4. Hit Enter. It doesn’t matter what the file will be named. You can delete this text file once the lockable folder has been made.

create-secured-locked-folder-windows-10-hit-enter-to-rename-or-name-the-file

5. Double-click the text file to open it.

create-secured-locked-folder-windows-10-open-text-file

6. Paste the below text into the new document:

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

7. Find where it says “Your-Password-Here” in the document.

create-secured-locked-folder-windows-10-copy-code-to-text-file-and-provide-the-folder-password

Replace “Your-Password-Here” with the password you want to lock the folder with.

create-secured-locked-folder-windows-10-your-password

9. Click File.

create-secured-locked-folder-windows-10-go-to-file

10. “Select Save As…”

create-secured-locked-folder-windows-10-save-as

11. Click on the “Text Documents (*.txt)” menu bar that’s next to “Save as type:”

create-secured-locked-folder-windows-10-save-as-type

12. Select “All Files”

create-secured-locked-folder-windows-10-select-all-files

13. Change the filename to “FolderLocker.bat”

create-secured-locked-folder-windows-10-save-as-bat-file

14. Click “Save”.

create-secured-locked-folder-windows-10-save-as-bat-file-click-save

15. Double-click FolderLocker.

create-secured-locked-folder-windows-10-open-the-saved-bat-file

You’ve now created a Locked folder.

create-secured-locked-folder-windows-10-created-locked-folder

16. Fill the Locker folder with the items you want to protect.

create-secured-locked-folder-windows-10-move-files-to-locked-folder

17. Open the FolderLocker file, because it’s time to lock that folder up!

create-secured-locked-folder-windows-10-open-the-bat-file-to-lock-the-folder

18. Type “Y” into the screen.

create-secured-locked-folder-windows-10-press-y-to-lock-the-folder

19. Click Enter, and the Folder Locker window will disappear, along with the Locker folder itself! Your secrets are safe!

create-secured-locked-folder-windows-10-press-y-to-lock-the-folder-and-click-enter

To unlock the folder, double-click “FolderLocker” to open it.

create-secured-locked-folder-windows-10-to-open-the-folder-open-the-bat-file-to-unlock-the-folder

Enter the password you entered in Step 8, and click Enter.

create-secured-locked-folder-windows-10-enter-password-to-unlock-the-folder

The Locker folder is back. You can open it to find your hidden files. Repeat Steps 17, 18, and 19 to lock the folder again.

create-secured-locked-folder-windows-10-locked-folder-is-back

create-secured-locked-folder-windows-10-folder-content

Other Third-Party Software To Password Protect Folders

If you are using Windows 10 Home (meaning EFS and built-in folder encryption is not available to you), you will need to use third-party applications to secure your folders.

A variety of antivirus software packages provide encrypted file storage functionality, including Bitdefender Total Security. Alternatively, you might use dedicated file encryption applications such as AxCrypt, which provides a Secured Folders function. This is a premium feature, but you can try the 30-day free trial software.

  • AxCrypt keeps track of these folders, encrypting any files that are added to them. This ensures that only files within the folder can be accessed. You can decrypt files using your own encryption password, although you will also need an AxCrypt account to use the software. However, passwords are stored locally.
  • To use AxCrypt, you would need to install the software first and build a new account when you launch it first. When launched, press the Secured Folders tab.
  • When encrypted, you will be able to access the folder, but any files stored within the folder will be encrypted with the.axx file suffix. Trying to open it would open the AxCrypt client, where you would first need to use your decryption password to decrypt files and make some adjustments. If you have already signed up, you won’t need to enter your password to edit any files.
  • If you want to decrypt your files later, right-click on the encrypted folder and press Axcrypt > Decrypt. This will disable encryption in that folder and remove all existing encryption.
  • Secure and Lock Folders in Windows 10

With built-in folder encryption and a range of third-party methods available, it’s never been easier to lock a folder by password and secure your most valuable files in Windows 10.

If you want to take it further, nothing is keeping you from encrypting all your files, whether it’s online or offline. This is a particularly good idea for online data, especially if you find out that a site or service you use has suffered a breach of data.

Scroll to Top