Lock Folders With Password in Windows 10/8.1 Without Software

Hiding your important files or folders from others is very easy on Windows 10 or Windows 8/7 PC. You can protect all your personal folders with a specific password that too without installing any software. This trick is very helpful for those who are having too much sensitive information in their PC.

In this tutorial, we’ll use batch programming to protect folders with a password. Don’t worry you don’t need to learn its just copy paste the code. Just follow the below instruction to lock your folders with passwords without using any software.

Lock folders with password

1) Open your notepad in your Windows 8.1/8/10 PC.

2) Copy the below code completely in your notepad. Starting from cls to End.

cls
@ECHO OFF
title FastTechBuzz.com
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST MyFolder goto MDMyFolder
:CONFIRM
echo ------------------------------------------
echo This Trick is Provided by FastTechBuzz.com
echo -------------------------------------------
echo Are you sure to lock this 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 MyFolder "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo ----------------------------------------------
echo Vist FastTechBuzz.com for more tips and tricks
echo ----------------------------------------------
echo Enter password to Unlock Your Secure Folder
set/p "pass=>"
if NOT %pass%== fasttechbuzz goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder
echo Folder Unlocked successfully by fasttechbuzz.com
goto End
:FAIL
echo Invalid password
goto end
:MDMyFolder
md MyFolder
echo MyFolder created successfully
goto End
:End

 

You Can Watch this tutorial on YouTube: Lock Folders With Password

3) Now save this file as any filename.bat .bat extension is must without that extension this method will not work. You can give whatever filename you wanted.

4) After saving this file open it and a new folder will be created called MyFolder. Now take all your personal folders, documents, pictures, videos whatever you wanted to lock and move them into MyFolder.

5) Again double click on filename.bat >> Then you will see a command prompt like below image. Then press Y to lock your folder.

protect folders with password

6) To unlock the folder again double click on the filename.bat you will be asked to enter your password as shown in
the figure below. The default password will be fast tech buzz.

lock files

How to change default password?

If you want to change your password replace fasttechbuzz with your password which is highlighted with blue color in the above snippet of code.

Watch This Tutorial now.Watch it on Full Screen.

Caution:

Don’t change any code other than password. To unlock folders which were hidden you should place the filename.bat file in the same location where your files were hidden.

Important Note: This is not the best way to secure your files. This method is just a simple method to hide files from people who don’t know much about computers. You this method at your own risk.

• Meet the Author • Srinu Ipathy


Hi, This is Srinu Ipathy. I'm a Full Time Blogger, Tech enthusiast & Gadget Freak. You can catch me on Facebook or onInstagram.


115 comments… add one
  • When checking ‘frequent’ files, search or history files, the files in the hidden folder can be seen and opened without a password. Is there a way not to see them there.

    Reply
  • I can’t see all my files after entering password!!!!!!!!!!!!!!!!!!!!!!!!!!!
    I mean after keeping all files,i unable to see my earlier files !!!!!!!!!!!!!!!!!!!!!!
    How Can i get of it????????????/

    Reply
  • I used this trick to password and hide a folder. There are certain ways to get into the folder without knowing the password but it is still a very useful trick. But one BIG problem. If you place other folders inside the folder that the batch file creates you can not hide it. I did actually change the password and the folder name and it works as it should with just files inside it but as soon as you place another folder inside it you can’t hide it or lock it.

    Reply
  • all the things are OK but if someone delete the .bat file . how to get the folder back .

    Reply
  • This is really simple and good. but the only problem I find is if someone deletes the .bat file all data will be lost….. is there any way i could avoid this?

    Reply
  • Hai..Thank you dear

    Reply
  • How can i get my documents back when i delete the anytime thing?

    Reply
  • thankyou sir it iz verry use full ….but if some body delete the file which we creat then wht happned and how can we change the password…plzz tell me

    Reply
  • hi, this trick is nice but I can Open the MyFolder without enter the password after Lock, I think it’s A Little BUG, isn’t?
    if U unhide the protected system files at folder Option(view tab) you can see the Folder named Control panel…..{…..} and that has your Protected file, and reachable without password.
    What’s your idea dear Srinu 😉

    Reply
    • Yeah. it’s just a little trick. not 100% secure way.

      Reply
    • I have an idea to remove this problem whenever u hide ur data from bat file u just unsigned the hidden items option.Your data will be show after hiding the data from the folder as control panel if u did not unsigned the “hidden items” option

      Reply
  • i cant change the pass plz tell me how to change

    Reply
  • hi,
    if we search that my folder in search option then unfortunately it displays everything…

    Reply
  • Hi this is a nice code. But I am facing a problem with it. When I lock the MyFolder it disappears but a new folder is visible (if Folders Hidden option is disabled) as “Control panel( ……. some code ……) ” it contains replica of the MyFolder and it is accessible. If we modify any file in Control panel folder it reflects in MyFolder too. so it is not much useful. Is there any solution for this.

    Reply
  • I locked my folder and did not go in for about a week. Today I tried to put in my password to open my folder but it wont open. It doesn’t say incorrect password or anything like that, the program window just closes without opening my folder. How can I retrieve my folder?

    Reply
  • your code simply hides the file and nothing else. If someone clicks “show hidden files”, the folder gets shows to them and that too opens without asking for password. So isn’t it better to hide the folder simply than to use your code…..

    Reply
  • Hi Sirnu,

    nice code, Thanks.

    My friend is also using the same code to hide personal folder and we both have access to same pc, he can search the file with ‘.bat’ and any time he can change the password which is easy to change and anyone can change the password to access my folder and later he can reset the old password once he view the folder and files without my knowledge.

    In this case how we can stop someone to access my folder ???

    I hope you understand my query.

    Thanks,

    Reply
    • this is simple code. It can’t help you in your situation but you can use some software.

      Reply
  • Thank you guys so much

    Reply
  • Code is not working for Windows 8.1. If we follow the instructions then we are getting folder with name Control Panel.{21EC2020-3AEA-….instead of newfolder. Nothing is new is with this code

    Reply
  • i cant find my files even though i have unlocked the folder. its EMPTY!!!

    Reply
  • I copy the suggested page and code to my notepad on Windows 8.1, save the file with .bat. When I click it, the MyFolder does not appear. Instead the .bat file opens, asking me to put in the password,
    Pl advise how I can solve the problem.

    Howard

    Reply
  • I cut the .bat file and pasted it in another drive. No when I click on .bat file on another drive it creates a new “My folder”. All of my saved assignements are lost. Please reply ASAP this is really important to me.

    Reply
  • it is nice,simple,useful and very helpful…. but any one can move,delete and change the content of bat file……….and it is easy to know the password of the specified folder name…
    Is it written in windows programming???????????

    Reply
  • WTF it has deleted all my data and showing an empty myfolder. now how can i get back my files :@ help me out here now :/

    Reply
    • Just search for that folder name.

      Reply
  • Your bat file is working …but answering “yes” it’s going in hidden mode and if I’m keeping the following option ” Hide protected operating system Files ” enabled then it’s showing my folder again and folder content is easily viewable without password (this was locked with password as per batch file instruction ) . I’m using Windows 7 Pro 32 Bit OS . How this should be avoided ..pls help .
    Thanks in advance .

    Reply
  • is this code secure?? will it harm my security through network..?

    Reply
  • thanks for your trick.its working. how can we lock the folders in other local drives

    Reply
  • Very Nice ! Amazing!!

    Reply
  • Srinu problem is that the folder is not hiding…!!! I’m using windows 8.1 please help me out

    Reply
  • Hi All! Has anyone of tried this on USB folder. It locks but when you remove the USB and again put it in computer the lock is gone or you find its not working. Why ? And if it is so then what’s the use of this whole thing?

    Reply
  • Its working Good trick. But i have a question How to recover the file i saved if the .bat file was deleted.
    Anyone can Help me?

    Reply
  • I have forgotten my password 🙁 is there any way to recollect ?

    Reply
    • don’t worry. Just again create the same batch file and run it. You will get ur folder. Hope it will help.

      Reply
  • Great ! thanks dear.

    Reply
  • it’s work!!! ..very easy steps ..thank u

    Reply
  • Hi guys,
    I am using one way to hide files.
    First place the folder inside the sub folders where no one wants to go.I places inside C drive sub folders.after placing the folder go to the properties and check hidden and apply.
    2)Go to control panel>folder options>view>click on don’t show hidden files>apply….now your files go invisible.
    3)If you want to see your files….Go to control panel>folder options>view>click on show hidden files>apply….now you can access your folders….

    This is a simple technique to hide your folders from your friends….. If you place folders deep inside c-drive…generally no one access c drive…I think it may be usefull….if it is not usefull..please ignore..thanks

    Reply
    • Yeah.you’re right.

      Reply
  • I could not change the password. Whenever I do right click on bat file there’s no option as “open as notepad”. Plz suggest me. I m using window 8.1

    Reply
  • I am facing a problem.
    I was using this trick for a long time. But now, i have my lock (secret folder) visible, when i open the lock.bat, and press ‘y’ to lock the folder, it says access is denied, cant find the file specified. And then the prompt disappears instantly. Help me Please.
    Thankyou.

    Reply

Don’t Be Shy » Leave a Comment!