Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Just wanted to know, is it possible to password protect any confidential folder without any third party software?

I am using Windows 7 x86 Professional Edition. But the folder i need to protect could be accessed in XP/Vista/7

share|improve this question
1  
What operating system are you using, romilnagrani? When you edit your question, you should add a tag for that OS as well. –  msanford May 22 '11 at 15:44
1  
Question updated! –  Romil N May 22 '11 at 15:49
2  
If you find you can't do it without third-party software, here is a question asking if you can do it with third-party software: Password protect a folder –  Kez May 22 '11 at 15:56
add comment

2 Answers

up vote 6 down vote accepted

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.

share|improve this answer
    
Without understanding how EFS works one should not use it. Otherwise this will earlier or later result in data loss because of encrypted data that can not be decrypted anymore (lost EFS key). –  Robert Sep 6 '12 at 13:39
    
@Robert: The exact same thing applies to all encryption tools. Windows prompts you several times to back up the key. –  grawity Sep 6 '12 at 13:59
    
But in EFS the key is automatically generated and a lot of users do not realize that there is a key and that this key is gone for example if the re-install Windows. –  Robert Sep 6 '12 at 14:30
1  
@Robert: Windows 7 displays the key generation UI to the user – and like I just said twice, repeatedly prompts the user to make a backup of that key. –  grawity Sep 6 '12 at 15:28
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.