• Enfield, London, United Kingdom
  • 0844 567 4250

Search

How To Create a Password Protected Folder in Windows 7

Dec 7

Written by:
Wed, 07 Dec 2011 12:33:10 GMT  RssIcon

1. First choose or create a folder and give it a name.

2. Open the folder by double left clicking it and then right click anywhere within the open folder and select “New” then “Text Document

3. Rename your newly created text file to 'Password.bat' (make sure the file extension is .bat - not .bat.txt)

Note: that you need to have file extensions view enabled in Windows in order to rename the .txt extension to .bat. Please follow the first to steps of the tutorial HERE if you do not know how to enable it.

4. Right click on the file password.bat and select 'Edit' this will open the file in Notepad.

5. Highlight and Copy the below text and then paste it into the Password.bat file:



@ECHO OFF
title Folder Private
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" 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 "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%== ENTER YOUR PASSWORD HERE goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End

6. Replace the text in the above script 'ENTER YOUR PASSWORD HERE' with your choice of password - it's best if it is something memorable and unique. Save the file by left clicking 'File' and selecting 'Save' in Notepad and close the file.

7. Now double left click on the password.bat file in the folder and this will create a Private folder. Simply 'copy and paste' the documents/data you want to protect into this Private folder.

8. Once you are finished copying/pasting your documents/data into the Private folder double left click the password.bat file and you will get prompted with: “Are You Sure You Want To Lock The Folder Y/N” - type Y and hit the enter/return key. The Private folder will disappear. It is wise to move the password.bat file to a different location on your computer or on a USB memory stick - as most people who are literate with Windows and bat(ch) files will be able to figure out how to open the password.bat file by right clicking it and selecting 'Edit', which will then reveal your password.

9. If you want the Private folder to reappear - simply move the password.bat file back into the original folder you created, and double left click on the password.bat file, when prompted - enter your password and hit enter/return key - like magic the Private folder will appear once again. Use this technique to Lock/Unlock the file as required.

If you have any questions or problems please do not hesitate to Contact Us.

Please Read:

If this Free tutorial was able to help - show us some support and help keep this knowledge base free by liking us on facebook, +1 us on Google Plus, install our amazing toolbar for instant access to our RSS feeds, follow us on twitter for all the latest trends in I.T and finally join our fantastic community forum where you can find help on all things I.T - from building your own PC to fix-it-yourself solutions from the Pros!


**Revenue from Pay-Per-Click Advertising is used to support this forum, any excess is donated to Doctors Without Borders**

Copyright Passionate About I.T © 2012

24 comments so far...


Gravatar

Step 6 is not clear and hence I am able to do it.
Please provide me with detail instructions, thanks.

By Kantilal (dadasr) on   Thu, 14 Jun 2012 19:18:39 GMT
Gravatar

Hi,In step 6 you need to delete the text "enter your password here" with your own password - the text you need to replace is in the body of the long script above - ill make it bold so you can find it easily by looking.Regards,Aizen

By Aizen on   Thu, 14 Jun 2012 19:31:26 GMT
Gravatar

Hi, i wanted to delete my map, but now i cant!! HELP?!?!?!?!

By Sander on   Tue, 28 Aug 2012 17:02:40 GMT
Gravatar

Hi Sander,

Can you please be clear about what you are trying to delete? It might be worth joining our computer help forum and describing your problem there.

By Aizen on   Tue, 28 Aug 2012 18:04:48 GMT
Gravatar

This worked a treat. Thanks - now I can hide all sorts ;-)

By Jason on   Tue, 28 Aug 2012 18:05:46 GMT
Gravatar

i am not able to implement step 7..please help

By aayushi on   Thu, 31 Jan 2013 11:03:04 GMT
Gravatar

Why not? What is the issue you are having?

By Aizen on   Thu, 31 Jan 2013 11:03:54 GMT
Gravatar

This only makes the folder hidden, i can still open the folder. Is this right?

By Alex on   Wed, 12 Jun 2013 19:36:33 GMT
Gravatar

No - if done correctly it should ask for a password. start from step 1 and work your way through slowly. if you get stuck give us a shout and we'll gladly help out.

By Aizen on   Thu, 13 Jun 2013 09:49:05 GMT
Gravatar

Having trouble getting a private file on step 7 I can only open the note pad

By Lynne on   Mon, 01 Jul 2013 00:01:07 GMT
Gravatar

when i enter password to open the folder it does not show the folder which i had locked

By amir saleem on   Fri, 29 Nov 2013 08:06:14 GMT
Gravatar

clear instructions thank you very much for the help!

By chris on   Thu, 19 Dec 2013 07:04:47 GMT
Gravatar

it works! thanks a lot

By Ngoc on   Sun, 05 Jan 2014 06:17:30 GMT
Gravatar

i am not able to do 7 th step pls help me.

By sachin on   Fri, 11 Apr 2014 10:53:07 GMT
Gravatar

What issue are you having Sachin?

By Aizen on   Fri, 11 Apr 2014 11:44:52 GMT
Gravatar

Could has another way to open the Private folder without use file password.bat? Because if I miss this file and forget the password it will be a big trouble :D

By Le Tu on   Mon, 14 Apr 2014 14:04:35 GMT
Gravatar

but after using this method. anyone can crack my password by right clicking of the mouse on the protected folder and selecting edit. And in the notepad anyone can change my password and it does not ask for any password.
so tell me what should i do to protect my folder.

By somesh singh on   Sun, 04 May 2014 16:14:56 GMT
Gravatar

Hayz! the password.bat is still visible so somebody easily seen my created password and still can access my folder.. is theres other way that no need to do this. ex. if i open the folder it automatically prompt to enter password?

By Dahana on   Thu, 08 May 2014 07:57:31 GMT
Gravatar

Having trouble in getting a private folder on step7. I can only open notepad, how to solve?

By Wenhui on   Wed, 21 May 2014 08:05:14 GMT
Gravatar

it only make it invisible, I want to enter password to view files not become visible

By Trevor on   Thu, 22 May 2014 10:39:06 GMT
Gravatar

I can still access my folder after repeating these steps multiple times from scratch. what can I do?

By ShinYW on   Sun, 25 May 2014 19:38:42 GMT
Gravatar

hi can the password input in the command prompt be asterisk? because the password inserted can be seen. if i wanted it to be asterisk, how can i make it?

By khairul on   Wed, 11 Jun 2014 03:31:36 GMT
Gravatar

I'ts working but anyone can find the password using edit the password.bat file.

By Sunil on   Thu, 12 Jun 2014 11:42:45 GMT
Gravatar

Guys,

It's very simple - move or hide the password.bat file once the folder is protected. Put it on a memory stick or hide it somewhere else on the computer.

By Aizen on   Thu, 12 Jun 2014 12:12:10 GMT

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 
Contact Us

Have an I.T Problem? Get in touch for an informal chat and find out how we can help

Click here

p4org1p4org2

Blog Calendar

Archive
<August 2014>
MonTueWedThuFriSatSun
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567
Monthly
Go
By continuing to use this site you agree to the use of cookies. To view our policy on cookies click here