Password protect any folder without any third party software?
There is no built-in feature for "password protection" in the usual sense. (Any suggestions to create a password-protected "compressed folder" should be ignored due to the incredibly weak "security" of ZIP 2.0 encryption.)
However, recent Windows versions (XP Pro, Vista Business/Enterprise/Ultimate, 7 Pro/Enterprise/Ultimate) support Encrypted File System (more commonly EFS). Right-click a file or folder, open Properties → Advanced, and enable Encrypt contents.
In EFS, files are encrypted using a certificate associated with your Windows user account, and your Windows password is used to protect the certificate. If another user is logged in, or if you lose your certificate, the file cannot be accessed. (Win 7 prompts you to make a backup of the certificate; in other versions, you can export it through certmgr.msc
.) It's also possible to add several users' certificates to the same file.
Create a folder, name it, then open it. Create a new text document, name it, then type the following or copy and paste it:
cls
@ECHO OFF
title Folder Private
if EXIST "HTG Locker" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you 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 Private "HTG Locker"
attrib +h +s "HTG Locker"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== PASSWORD_GOES_HERE goto FAIL
attrib -h -s "HTG Locker"
ren "HTG Locker" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
Then change the PASSWORD_GOES_HERE
to anything you want – it'll be your password. Save the text, then change the TEXT DOCUMENT.txt
to Locker.bat
.
If you can't see the extension of the folder, go to Organise wich will be in the left coner of the folder, then go to Folder and Search Options. Go to View and uncheck the Hide extension for known file types. Click Apply and you will see the extension.
Double click the Locker.bat
. This will create a folder called Private
. Then put the things you want to lock in it and go back and open the Locker.bat
.
If you want to lock the folder type y
then hit Enter. The Private
file will disappear. If you want to open the private file, open the Locker.bat
, type your password then hit Enter.
Note: This is not the place to store confidential information, such as medical records, financial information or passwords. This is not the best place to hide things from an IT professional, but it should work against newbies or people with intermediate computer skills.