How to Create a Secured and Locked Folder in Windows XP

UPDATE: Since some people were having issues with this method of hiding a folder in XP (folder being renamed incorrectly, visible via the command prompt, etc), I am adding to the bottom another way to permanently hide a folder using a program called Free Hide Folder. Please scroll down to read about it.

If you’ve come across this page looking for a way to create a password protected, secure, hidden or locked folder in Windows XP for free, you’ve come to the right place. Unfortunately, Windows XP does not have any user-friendly built-in tools to create secure folders on computers with multiple users. Of course, you can encrypt data on your hard disk, but this only helps if your computer is stolen.

In a previous post, I wrote about how you can hide a folder in Windows XP using a rudimentary built-in feature. This method is useful if you want to hide a folder or file and you’re pretty sure that anyone who is using the computer will have no idea how to un-hide the data. If you’re dealing with someone a little more computer savvy, there is another way to create a secure locked folder without having to buy any 3rd party software. This only works on Windows XP, not in Windows 7 or Windows 8.

It basically involves using a script to morph the folder into something completely different so that it’s still visible, but nothing inside the folder is accessible. In order to view the data, you have to run another script to morph it back. Anyone who clicks on the folder will be brought to the Control Panel and simply think it is a shortcut. The other neat thing about this little trick is that any of the files or folders inside the hidden folder will not show up when you perform a search in Explorer.

Note: Before you try this on some really important sensitive data, you should make sure you create a test folder with some fake test data to ensure you get it working properly. Since we’re messing with the internals of the folder, it could cause data loss if not done properly. 

Here are the steps to create the protected folder in Windows XP:

  • First create a folder that you will use to store your confidential data. For example, I have created a folder called Fonts at the root of my D drive. Since the hidden folder will bring you to the Control Panel, it’s best to name the folder as one of the programs inside there.

folder to hide

  • In the same location where you created the new folder, create a new file in Notepad, copy the following below into it, replace Fonts with the name of your folder and save it as lock.bat.

ren Fonts Fonts.{21EC2020-3AEA-1069-A2DD-08002B30309D}

  • To save the file as a .bat file in Notepad, just put the whole thing in quotes, like “lock.bat” and then click Save.

lock folder

  • Now you should have a bat file named lock in the same directory as your Fonts folder, not inside the Fonts folder.

hide folder

  • Create another NotePad file and type in the following listed below and save it as key.bat.

ren Fonts.{21EC2020-3AEA-1069-A2DD-08002B30309D} Fonts

  • Now you’ll have lock.bat and key.bat along with your folder. Go ahead and double-click on lock.bat and your folder will turn into the Control Panel and nothing inside can be viewed. Clicking on it will simply bring you to the Control Panel. You’ll notice the icon should have changed also.

lock key folder

  • To view the data inside your folder again, click on key.bat and your folder will return to normal! Pretty simple!

Of course, keeping the key.bat file in the same folder will defeat the purpose of securing the folder, so it’s best to move the key.bat file somewhere else, or even better, put it on a USB stick or CD that only you can access.

Most people will be probably look at the folder and simply ignore it since it has the control panel icon and it links directly there. Of course, if someone knows this trick also, they can create their own key.bat file, etc and open it back up. However, if you’re dealing with someone who can do all of that, it’s best you check out more advanced 3rd party software to lock down a folder.

ALTERNATIVE METHOD:

If you’re having trouble with the above-mentioned method (from what I can see from the comments, a good number of people are), then here’s another quick and free way to create a secure folder in Windows XP. There is a very nice program called Free Hide Folder from Cleanersoft that allows you to easily hide your private folders.

Your folders are completely hidden and you must supply a password to open the program to unhide the folders. The personal edition is free, just click the Skip Registration button unless you’re using it for commercial purposes.

free hide folder

I’ve tried this program myself and I cannot access the hidden folder via Windows Explorer nor the command prompt. So if the above method is not working, give this a shot! Any questions, post a comment. Enjoy!

More posts from the Computer Tips Category

Troubleshoot Windows XP Wireless Network Connection Problems

toolsfolderoptions.png

Hide Files and Folders in Windows (Easily Hacked)

Play Corrupted and Damaged Videos

Turn Your Laptop, Netbook, or Desktop into an eBook Reader

Popular Posts This Month

Wireless Tips – Does Your Wireless Router Keep Disconnecting or Dropping the Connection?

How to Setup Remote Desktop on Windows XP

internet explorer

Switch Between Tabs in Any Browser Using Shortcut Keys

How to Clear or Hide Your Search and Browsing History

  1. Brendan says:

    What happened to the good old "Encrypted" attribute on folders? This seems like a rather overly complex way to protect a folder.

  2. akishore says:

    Hi Brendan,

    Thanks for visiting my site! That’s a great question that you have. The problem with the “Encrypted” attribute is that it does not prevent someone from accessing that folder if the person can simply log onto your computer under your name. This type of hiding is meant for people who have kids or someone else in the house that they can’t “restrict”, but they still want to hide something from! Does that make sense? Using Windows encryption only helps prevent someone from stealing your data if they take your computer and can’t log onto your account.

    Aseem

  3. Theodorik O'Bro says:

    Hi,

    Just tried this and I see how well it works… from Windows Explorer! NOT the CMD prompt though.

    Is there any way to make this a proper "full" secure and locked folder in XP?

    Otherwise, I'll have to find another solution.

    Cheers,

    db

  4. SP says:

    Very cool technique – However, I can still search for files. How can we prevent the files from showing up in the search? Thanks.

  5. Chakri says:

    Hey I think it doesn’t work for folders having spaces in between the folder name. As I've tried to and it failed.

    Is there any solution for this??

  6. Bj says:

    I would like to lock a folder I keep on my desktop but keep the 'lock' and 'key' in a folder elsewhere. Can I do this?

  7. John Smith says:

    Very neat, but you are still able to get to the folder at a command prompt by referencing the DOS 8.3 name as given by the dir /x. Still cool none the less.

  8. Nazgul-Killer says:

    Thanks a lot man, it helps much. I share this computer with many people, including my parents and as you might've figured, I really don't want my parents to see this certain folder and I don't want anyone else to see the other one, excuse me if I will not specify why, but you get the picture.

    Question: Does putting the lock/key files, or the locked folder under "hidden" mode in the settings, disrupt anything? Does it even matter? I really didn't see any problems YET, so better safe than sorry. Please do reply, and thanks again.

  9. Alex James says:

    Great tip…however, XP, being a multi-user system, is quite capable of locking folders BUT only IF you use it as a multi-user system and not 1 account for 7 members of the family. Create 7 accounts and specify what users can access what folders. Simply right click on a folder, choose Properties and choose Security tab. You can then add/remove users there and their privileges.

  10. Techbuzzard says:

    I would like to add one note about Free Hide Folder utility. Its a nice program, but if you ever need to format your drive and reinstall the operating system again, first unlock the folder you have locked through Free Hide and then reinstall the OS. What happens is that if you dont unlock the folder, and after a fresh install, you will not be able to see the folder which you have locked via Free Hide. But there is a work around which I will tell later. My personal favourite for hiding and locking folders is Lockbox and this is free.

  11. BBJ says:

    " Unfortunately, Windows XP does not have any user-friendly built-in tools to create secure folders on computers with multiple users "

    Oh really ? Why simply not use NTFS access control so that ONLY specific admin group can access to the folder and the other "users or guests to your PC " would not be able to?

  12. Archiver says:

    The method above will surely trick common users; It's also hard to create a key.bat from scratch for them. Alternative file managers/file explorers can get through though with only one click.

  13. Joe says:

    When I click on Lock.bat file, the folder changed and the folder locks. When I click on Key.bat file it will not unlock. What's wrong?

  14. David Locke says:

    Nothing entered on or resident on a PC is secure. If you are trying to keep your peers out of your content fine, but never think that it is really secured.

    Oddly enough, using a police forensic application, I can pull your passwords for your online accounts off of your PC, this even if your browser did not save your passwords, and open your online accounts. Nothing is going to secure you from that application. Anything on silicon and magnetic media can be recovered. If it is on a PC, cell phone, or GPS device, it is not secured, except from your peers, which might be enough.

    Further, current commercial encryption sold by U.S. companies have their bit length limited to 256 bits. Yes, 256-bit DES is being replaced by 256-bit AES, but the bit length isn't getting longer, so brute force attacks can find the key in 2.5 months. There is no such thing as strategic encryption.

    Yes, there are encryption packages available that have longer key lengths, but you won't find those online, and you will pay a premium price. The vendors selling that stuff know that they are subject to export control laws. Putting that on your laptop means that your laptop won't leave the country.

  15. chaps says:

    Thank you for this great tips. I am just wondering, what if someone deleted the secure "Fonts" folder? Is the file still there? I tried deleting the folder and the folder was deleted. Thanks again.

  16. Archie says:

    Well, any File Manager, for example FAR manager, can view these folders, it's not secure. I recommend trying "Protect Folder" from Everstrike Software.

    Create a secure folder with your password, copy your files into this folder and they will be encrypted on-the-fly. You can click on this folder and you will be asked for your password – very handy.

  17. teefa says:

    This was really helpful, I had some confidential files that I needed to protect on my computer.

  18. vijay says:

    Its working. I now have a secure and locked folder! Thank you so much!

  19. Kumar says:

    I have tried both methods, the lock and key bat files and Free Hide Folder. The latter is definitely easier for most people and is more secure.

  20. Lane says:

    Simple yet effective way to hide files and folders in XP. A freeware program could be easier, but here you don't have to install anything.

  21. yasin says:

    This is not a really secure way to create a hidden folder in Windows. I would suggest a third party utility rather than relying on Windows.

  22. Alyssa says:

    Quick question.

    "Of course, keeping the key.bat file in the same folder will defeat the purpose of securing the folder, so it’s best to move the key.bat file somewhere else, or even better, put it on a USB stick or CD that only you can access."

    Okay, I got the whole thing to work. I took the key.bat file and put it in a different folder to test it out real quick – and it doesn't unlock the folder unless it's in the same folder! Thus, you know, defeating the purpose.

    What am I doing wrong?

  23. Alauddin says:

    You are a genius, but there is a problem when renaming the folder. After you rename it, it doesn't work. Please check it. Thanks

  24. Lux says:

    Very interesting method :P Thanks! An intruder may not even suspect that there's something hidden within.

    He made you create .bat instead of renaming directly from command prompt to save you time each time you lock and unlock it. For those who haven't been able to unlock your own folder using your key.bat, make you sure you haven't hidden the private folder already (right click > properties > uncheck hidden). It didn't seem to recognize hidden folders.

    If you prefer to keep the .bat files in the same folder, you can also rename them to .exe for an extra advantage. They'll stop working until you rename them to .bat again. Chances of others suspecting that it's a renamed .bat file = almost nil.

  25. Someone says:

    The whole premise of this article is completely wrong – XP does allow you to easily protect and hide folders!

    Just set NTFS permissions on the folders.

    The solution proposed in this article is not really secure, whereas using NTFS permissions are.

  26. Bruce says:

    Hi, I tried the Free Hide Folder program and, though it hides the folder, I can still access it using windows explorer or command prompt. Is it because I'm using Windows 7?

    If I use WinRAR to view my hard disk, the hidden folder is shown right there, and I can just open any file in it without the password. Is this how the program works? Or am I missing something?

    Thanks for the great article!

  27. curiousgeorge says:

    If I was to use this method to hide a file named say "file" inside a secured folder, would it show up if I searched it using windows explorer?

    Would it be possible to hide a program in a folder using this method?

Leave a Reply