Lock folder with a password in Windows 10

Hello and welcome everyone. In today’s article, you will learn how to lock folder and content in it.

Please be aware of few things:

  1. The method is shown here works, but you need to be careful and follow step by step or you will damage your files permanently,
  2. If you forget your password, you can not access your files anymore
  3. Your files altho protected can still show up in recent files of some applications

All of that being said, let us start with locking the local folder on the computer with the password.

Go to the folder where you have files that you would like to hide and lock with a password. Enter the folder and create the new text file inside it. Skip the name for now and go inside it. Copy and paste the following code 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


Now locate this line of code in the document: if NOT %pass%==Your-Password-Here goto FAIL and replace Your-Password-Here with your password.

!!! Write down somewhere your password, if you lose it you will lock the folder even for you !!!

Save the file as FolderLocker.bat and double-click on it to execute it.

If everything was done correctly, a new folder with the name: Locker

Move files that you want to hide and protect inside that folder.

Double click again on FolderLocker.bat

The command prompt will appear with the question do you want to lock the folder, press Y, and press ENTER. The command prompt will close and the Locker folder will disappear.

In order to unhide and access the folder, you will need to double click on FolderLocker.bat again but this time command prompt with ENTER your password will appear. Type in your chosen password and the folder is back. If you wish to hide and lock it again just double click on FolderLocker.bat again, confirm with Y and it is hidden again.

Congratulations, you have just Locked the folder with the password in Windows 10 all by yourself. If you would like to read more helpful articles and tips about various software and hardware visit errortools.com daily.

Now that’s how you Lock folder with password in Windows 10 on a computer. On the other hand, if your computer is going through some system-related issues that have to get fixed, there is a one-click solution known as Restoro you could check out to resolve them.

This program is a useful tool that could repair corrupted registries and optimize your PC’s overall performance. Aside from that, it also cleans out your computer for any junk or corrupted files that help you eliminate any unwanted files from your system. This is basically a solution that’s within your grasp with just a click. It’s easy to use as it is user-friendly. For a complete set of instructions in downloading and using it, refer to the steps below

Perform a full system scan using Restoro. To do so, follow the instructions below.

  1. Download and install Restoro from the official site.
  2. Once the installation process is completed, run Restoro to perform a full system scan.
    restoro application screen
  3. After the scan is completed click the “Start Repair” button.
    restoro application screen
Error tools logo

PRIVACY     TERMS

Copyright © 2021, ErrorTools. All Rights Reserved Trademarks: Microsoft Windows logos are registered trademarks of Microsoft. Disclaimer: ErrorTools.com is not affiliated with Microsoft, nor claim direct affiliation. The information on this page is provided for information purposes only.

Log in with your credentials

Forgot your details?