Skip to main content

How to Password Protect a Folder in Windows


Take a second to consider how much sensitive information you have stored on your computer at this moment. Bank information? Family photos? Financial documents?
As secure as your files feel on your PC, they’re also prime targets for malicious intent. Password protecting your sensitive folders is a basic security step. Think of it as a virtual vault, which encrypts whatever files or additional folders you’d need kept safe.
Read on to learn how to create a password-protected folder to keep your precious files protected, and sneaky onlookers at bay.

Method 1: Text-Based Folder Lock

While Windows 10 doesn’t allow users to password protect folders by default, you can use a batch script to lock folders using a password of your choice.
Start by navigating to the folder you’d like to lock. I’ll create a new folder to use as a virtual safe named Safe.
Double-click the folder. You’ll be creating your batch file within the directory that’ll store your locked folder. Create an empty text document within your folder by right-clicking an empty space and selecting New > Text Document.
How to Password Protect a Folder in Windows new text document
Within this document, copy and paste the following code:
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 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
To set your password, change the your_password bit in the line if NOT “%pass%==your_password” goto FAIL to a password of your choice:
How to Password Protect a Folder in Windows change password locker bat
Once you’ve added your password, head to File > Save As within your Notepad program. Name it anything you’d like, Locker in my case, but ensure you add a .bat extension to your file. In my case, I will name my file Locker.bat (ensuring I’ve included the extension).
Double-click the BAT file to create your Locker folder. This is the folder that will be locked with your password. You should now have a folder and a file named Locker.
How to Password Protect a Folder in Windows locker file and folder
Place all your sensitive documents within this Locker folder. Once you’ve placed your files, double-click your Locker.bat file again. A command prompt will open asking if you want to lock your folder. Input Y and press Enter.
How to Password Protect a Folder in Windows locker cmd prompt lock
Poof! Your folder should disappear. This is a natural byproduct of your BAT file.
To access your files again, double-click on your Locker.bat file. You will be prompted to enter the password you added when creating the file.
How to Password Protect a Folder in Windows locker cmd prompt unlock
Voila! If you enter your password correctly, your Locker folder will reappear again.
Note: This BAT file can be changed via your PC. That means others who are familiar with this trick may be able to change your password. For the most part, however, this nifty little trick will add a much needed buffer to your most sensitive local documents!

Comments

Popular posts from this blog

Top 6 Torrent Alternatives

Top 6  ยต Torrent Alternatives here was a time when uTorrent was hailed by every torrent downloader, until BitTorrent, Inc. bought it. It was an open-source client and very light, but BitTorrent made it closed source and filled it with ads and spammy offers. Although, it is still used by many people, but some people who are not comfortable with the current state of uTorrent seek for alternatives. Fortunately, there are many Torrent clients available, both open and closed source. Some are quite similar to uTorrent and others may offer different unique features that even uTorrent lacks. However, choosing the right uTorrent alternative can be a bit of a problem as many other torrent clients also add malware and viruses that may damage your PC. To help you with your search, we have gathered some interesting uTorrent alternatives below with least suspicious activity. Although, some of them still offer Adware, but it can be easily declined if you are a bit careful (don’t worry, we

Why Does Everyone Want Your Data?

Data: companies want it, users have it, and it’s valuable because it can be used to sell people things. Beyond that, it’s not often made clear exactly what user data consists of, where it goes, and how it’s profitable. Why does this multi-billion dollar industry full of data brokers, advertisers, and technology companies exist? What’s in the data? “User data” is pretty much everything that a particular company knows about you. It’s often broken down into three main categories: explicit/declared data, implicit/inferred data, and third-party data. Explicit data  is anything that a user gives a company voluntarily. Generally, this is done when a customer signs up for a service or creates some kind of profile, and it can include everything from your name (though it’s often anonymized), age, and location to your hobbies and personality type. These details are just basic user data, and since they’re so widespread and easy to obtain, the most common data points aren’t worth very

Things you Did not know in AVENGERS : ENDGAME trailer

After months of waiting and endless speculation , the trailer for the fourth avengers movie have finally arrived.For one thing,the trailer reveals the title of the feature as avengers end game, confirming previously leaked info indicating that might be the case.  So if you have watched this trailer a thousand times lets break down some of the small details you may have missed in the trailer for the avengers End game. 1 .  THE SCARECROW  I'm retired-Thanos from the comics Hard working idiot Thanos - Now retired to his quite life as a big purple space farmer , has put up his amour for good as an incredibly imposing scarecrow.  As for Thanos himself , he is only  briefly seen in the trailer,running his hands over some plant life with his burnt up infinity gauntlet. 2 THE RETURN OF THE RONIN Hawkeye a.k.a Ronin he's not cutting his hands but has a lot of blood so hes cleaning it. Hawkeye is still alive. He's seen fighting in the streets of Japan