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

Modern Combat 4 Zero Hour - A must have game on android

Modern Combat 4 Zero Hour - A must have game on android Gameloft has arrived with yet another benchmark breaking game on Android and IOS. Droid users after waiting for a long time as compared to IOS users have finally got chance to get hands on the latest game of the modern combat series. Since the launch of the 1st modern combat series it has always been a benchmark setter and this game is no exception.   Modern combat 4 : zero hours brings out the real juice of hardware ,graphic capabilities and thrill of first person shooting experience along with the blend of awesome story line up to render quality game playing which is close to that of a high end gaming console. Playing this game can make you stick for hours with your device forgotten into the world of fps shooters. As said it definitely is way ahead of other FPS games available on app store and google play. This is more than casual gaming, taking it to the next level of seriousness. Let’s have a look at what all...

Xbox One X: The Beast You Probably Don’t Want Right Now

Xbox One X: The Beast You Probably Don’t Want Right Now The gaming console market has always had a fierce rivalry between Sony and Microsoft. When we talk about the previous gen, the Xbox 360 clearly had the upper hand against the Sony PS3. But then the tables were reversed when both the companies brought about their current gen consoles, the PS4, and the Xbox One. The PS4 beat the Xbox One out of the park, scoring huge sales numbers, and leading Microsoft to question their marketing strategy. Later on, Microsoft did introduce the  Xbox One S  to compete against the  PS4 Slim , though that was a competition in which there was no clear winner. Now, 4 years since the launch of the original Xbox One, Microsoft has brought about the Xbox One X, the next-gen console, which goes head-to-head with Sony’s  PS4 Pro . The biggest selling point of these next-gen consoles is the ability to play games in native 4K resolution. While the PS4 Pro does pack in quite a punc...

How to Create Live Wallpaper in Windows 10

When Windows 10 introduced its own dynamic wallpaper feature, many were excited about getting regular photo updates to their backgrounds that could take them to faraway lands. But, if you’re like me, sometimes a simple photo just isn’t enough to inspire you when you’re staring at your Windows 10 desktop. That’s where live wallpapers come in. Although not for everyone, these animated images can add just the right amount of spice to your desktop or laptop when you’re feeling the dreary drag of the workday! What to Consider Although desktop users won’t necessarily find themselves affected by this issue, anyone considering setting up their live wallpaper on a Windows laptop or tablet should realize that while beautiful to look at, live wallpapers do eat up a bit more battery life than a standard wallpaper would. If you don’t have much charge left or don’t have a ton of capacity to begin with, you might want to consider sticking with a standard wallpaper. Also, even tho...