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.

How can I set a password on a folder in Windows XP?

share|improve this question

migrated from serverfault.com Jul 7 '10 at 20:32

This question came from our site for professional system and network administrators.

7 Answers 7

The best option would probably be to use something like TrueCrypt.

share|improve this answer

Need more info to help you determine the best option. Like, do you need to encrypt a folder for your use only? Are you sharing the files in the folder w/ others, who are also editing those files? Are you sharing across a LAN or WAN? etc.

Absent that info, I'll throw out some random ideas! Here goes...

  • EFS (encrypting file system) - use that if you have XP Pro (not Home); you'll be able to access files in a given encrypted directory transparently, as the decryption key is tied to your Windows login. (Caution - take special care when backing up EFS-encrypted files to also back up the EFS recovery key!)
  • Full disk encryption programs, including: TrueCrypt, PGP WDE, etc. Rather than just encryptiong a folder, you'd either encrypt your entire disk (including the operating system itself), or you'd create a virtual drive (mountable as a drive letter), or encrypt a partition on your machine.
  • If you're really interested in secure file transfer, then you can use a tool like PGP Desktop or SecureZip for this purpose (or in addition to the above ideas... in other words, the data is encrypted while on your machine as well as in transit).
share|improve this answer

With TrueCrypt, you create a single file on your computer's hard drive that is encrypted. If someone looks at that file all they see is random data - there's no way to know what that file contains.

Once you "mount" that file using TrueCrypt, and supply the correct password or pass-phrase to unlock it, the contents of that file appear as another drive on your system.

For example, I might have a file "c:\Windows\secretstuff.tc". There's nothing you can do with that file without TrueCrypt and the password to the file. Since I know the password, I can mount it using TrueCrypt and suddenly a new drive appears - say "P:". That drive then contains all my protected files. I can change them, update them, delete them - whatever. Once I'm done, I can hide them all again by simply unmounting the TrueCrypt drive.

It's both simple and elegant.

And it's not tied to Windows, user accounts or anything else. In fact, you can copy your encrypted file to another machine entirely and mount it with TrueCrypt. Even using other systems such as Linux.

And while any encryption is vulnerable if you pick a bad password, the actual encryption algorithms used by TrueCrypt are "industrial strength" and nearly impossible to crack with current technologies.

share|improve this answer

Microsoft released Microsoft Private Folder a couple of years ago. I am sure a Google search will locate it for you.

Essentially, a double-click would prompt for the password and allow access. Pretty simple.

EDIT - just found it: http://www.msblog.org/2006/07/06/microsoft-private-folder-10/

share|improve this answer
    
And it died a (couple of - 1.5) years ago, too. –  grawity Jun 29 '09 at 19:41

This is a common enough question (I'm guaranteed to get it from users at least once per quarter myself) and the short answer is that - without some external tool - you can't.

The misconception generally comes from the fact that it's possible to password-"protect" a Word doc; but what's actually going on here is that Word itself is providing the password-"protection". Password protection of files and folders is NOT a feature of the NTFS filesystem.

Now, consider the objective you want to achieve here. I don't think you specifically want to use a password, I think instead that you want to have a specific folder that has access restricted to certain selected individuals. You can do this just as easily, and in a format that's going to be natively supported by the OS (as well as recoverable by an administrator in the event of a DR), so NTFS permissions will meet your requirement precisely.

If on the other hand you want to prevent even an administrator from seeing the folder contents, you need to be prepared to accept the implications, such as not being able to recover it in a DR scenario, losing your data if you forget the password, and so on.

share|improve this answer

You can use Folder Password Expert to set a password for a folder in Windows.

share|improve this answer

Create Your Password Protected Folder

Before you get started you need to create a folder that will house your password protected folder, this is just an ordinary folder and can be located anywhere and named anything.Navigate into your newly created folder and create a new Text Document. This can easily be done from the context menu.

image

Open the document, now paste the following code into the contents of the document:

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

Change the PASSWORD_GOES_HERE text to the password you want to set. Now go ahead and save the file as locker.bat.Once the file is saved as a batch file you can delete the original text file.Now run your batch file by double clicking on it–the first time you run it, it will create a folder called Private. This is where you can store all your secret things. When you have finished adding all your stuff to the Private folder, run locker.bat again.This time you will be asked if you sure that you want to lock the folder, press the “Y” key and hit enter to lock your folder.You will see that your Private folder quickly disappears.If you run the script yet again, you will prompted for a password. If you enter the same password as you set in the script the Private folder will reappear if you enter the incorrect password the script will just Terminate.hope its help.

share|improve this answer

protected by nhinkle May 13 at 6:24

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?