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

All You Need To Know About FAR CRY 6

  Far cry 6 is an upcoming game developed and published by Ubisoft which is available for PC, PS4 , PS5 , Xbox , Google Stadia, and Amazon Luna . It is the 6th installment of the Far Cry series. This game was originally scheduled for release on February 18, 2021, but on October 29, 2020, Ubisoft announced that the release will be delayed due to impacts from the ongoing COVID-19 pandemic. During Ubisoft's quarterly earnings call in February 2021, the company announced that the game would be released before September 30, 2021. As part of further gameplay reveals on May 28, 2021, Ubisoft also announced the planned release date for Far Cry 6 as of October 7, 2021. Gameplay Just like the previous title this game is a first-person action shooter game with players using makeshift weapons and titles and fight their way to attain freedom from some militant groups. Have a look at the official gameplay reveal by Ubisoft below Story Setting This game is set on a fictional island called Yara...

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...

THE LAST OF US PART 2 (spoiler free review )

  The Last of Us Part II is a 2020 action-adventure game developed by Naughty Dog and published by Sony Interactive Entertainment for the PlayStation 4 . Set five years after The Last of Us (2013), the game focuses on two playable characters in the post-apocalyptic United States whose lives intertwine: Ellie, who sets out for revenge after suffering a tragedy, and Abby, a soldier who becomes involved in a conflict between her militia and a religious cult. The game is played from the third-person perspective and allows the player to fight human enemies and cannibalistic zombie-like creatures with firearms, i mprovised weapons, and stealth. Release After the success of the critically acclaimed “The Last Of Us “ which was the "game of the year" in 2013, Naughty dog released its sequel “The Last Of Us Part 2” in the midst of the pandemic in 2020. Though Naughty Dog is known for their incredibly detailed games like the uncharted series, they couldn’t keep up with the first im...