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.

Photo of author

Srinu Ipathy

I’m Srinu Ipathy, Editor of Fast Tech Buzz, https://deletefootprints.ai/ and several other blogs. I’m a Blogger, Digital Marketer, App developer, avid traveller, and landscape photographer with a keen interest in crypto, Finance, and AI. To know more, add me on Facebook or on Instagram.

114 thoughts on “Lock Folders With Password in Windows 10/8.1 Without Software”

  1. I was looking for a software to lock folders with passwords but i found this on Facebook. Thanks for sharing.

  2. if i lock my folder using this code and if after that i delete this code then how can i get my that folder back?

    • Right click on the bat file and choose edit. Now, replace the old password with the new one. That’s it .

  3. We can change the default password
    just change this line
    if NOT %pass%== fasttechbuzz goto FAIL
    in this line change the fasttechbuzz to ur password

  4. Great, works a treat. Only problem I have is finding a way to hide the batch file as anyone can open it and read the password. I tried moving it to MyFolder and creating a desktop shortcut, but that only created another MyFolder inside MyFolder, (which works as expected), but the batch file is still editable as the first MyFolder is always there.

    Any ideas?

  5. Heyy, em still unable to put on my own password, how exactly i can do that, where’s the blue snippet up there?

  6. I follow your instructions, created folder fantastic, however, when I moved files into folder and go to lock, it changed the name to this “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” and the folder in not locked.
    what went wrong? I’m using windows 8.1 64 bit.
    Thanks

  7. I follow your instructions, created folder fantastic, however, when I moved files into folder and go to lock, it changed the name to this “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” and the folder in not locked.
    what went wrong? I’m using windows 8.1 64 bit. and i did refresh it still the same
    Thanks

  8. I have tried this just as you directed, but after typing “Y” on the prompt command the folder became hidden, but after refreshing i can still open the folder without being interrupted for password. i am running windows 8.1 pro.

  9. I have tried this just as you directed, but after typing “Y” on the prompt command the folder became hidden, but after refreshing i can still open the folder without being interrupted for password. i am running windows 7 64bit

  10. i am using windows 8.1 and i followed all the steps as instructed but instead of disappearing the file just becomes translucent and can still be opened. the fine name changes “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” ….when i lock the folder it turns translucent but stays in the same place and when i unlock the folder it looks normal again! please help :/

      • Hi, sorry about this. I tried this before, and I just tried again, if I put a space between My and Folder it goes straight to the ‘are you sure to lock this folder?’ screen, so the actual folder is never made. If I put My_Folder, everything works as normal, it is only when I put My Folder that it goes wrong.
        It’s not a big issue, I just like the look of the space between the words.
        Thanks for your time already.

  11. Hey, thanks, it works really well, is there any way of putting a space in MyFolder, or any other words for that matter, to make it My Folder?

  12. Nice it works,,, But want to confirm that can I copy this bat file in my pendrive and use the same hiden files in someother systems??Will that hidden files will be maintained???

  13. Hi it is really great one working well. But got a problem that if I copy files directly to Myfolder they could not retrieved getting an error while I copying them back. If I copy folders directly it is working well. Could you please help me to get back back my files from Myfolder

  14. i followed as u said..but after locking using the bat file..folder is not vanishing and its not locked..its looks like normal folder. am using windows 8.1 pro

  15. Hey this does not lock the file it just marks it as hidden anyone with the slightest bit of computer knowledge will easily get into your folder but it is a good way to hide files from your average user

  16. Hey, Thank you for this. It is awesome. But, for some odd reason when I create the folder, everything works great! But once I unlock the folder and access the files inside of it, and the try to relock the folder it tells me access denied and will not hide the folder again. Also, which line do I change to make the default folder name different?

  17. Guys, I found out the problem in Windows 8.1 that shows the hidden folder as the control panel file! Go to C:\Users, then in view tab select options and then click on change folder and search options. After the window pops up, go to View, then find Hidden Files and folders. Now, choose Don’t show hidden folder, files and drives. If it was marked at Show hidden folders, then that was the problem.

  18. It works great until somebody types in folder search some of the words of hidden files, like “a” or “b” or “c”…. Then it shows everything and files can be opened.

    There are many free programs to hide files and folders like Wise Folder Hider…
    These programs only hide the path to files and if somebody has a few hours of time and wants to find them, he will with cleaning registry errors and some other tricks.

    Better hiding is made with encryption like WinRar password archive and file name encryption but it takes time to later open the files.

  19. To bypass this
    If you save the files in
    C:\Users\ryuzaki\Downloads\Myfolder
    And the Myfolder icon disapears. Go to downloads and in the search dialog box type random alphabets & one of the files will be from Myfolder right click on that file and select open file location.

  20. Hi, this works great but if I upgrade my computer will the files move over with my backup i.e. if I copy my c drive contents straight over?

  21. hlw there! i have a problem using this,i followed ur instructions a create a notepad file.on clcking that i got myfolder i dragged my every important folder there and locked them but now when i want to unlock them i didn’t get my MyFolder back even on putting correct passcode plz help me out of this i dragged my every imprtnt document there and i need them back.plz help

        • This is simple trick for beginners. This may not work all the time. If you are serious about this you can get some folder lock software.

    • goto the drive where u created ur personal folder. then if u use windows 8, then goto view then mark hidden items. then ull get all ur files back. if u use win 7, click alt then goto tools there view then click on show hidden items. thts it. ull get back ur all files

  22. thank you so much. this is a big help to hide a file on my laptop so my husband wont see it because im planning to surprise him 🙂

  23. i’ve downloaded the code and i successfully implemented it on my folders but unfortunately my lappy was subjected to virus and i have to scan the whole thing after scanning was done i opened the lock and i found my locked folder was lost ;(

  24. But if some opens- Clicks edit , any view my password. Its all waste na . How to avoid that

    & also let me know how to rename the folder name here-After creating it…

  25. Nice work, but please enter a code line in your program which can hide the password alphabets like ******. thanks!

  26. 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.

  27. 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????????????/

  28. 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.

  29. 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?

  30. 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

  31. 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 😉

    • 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

  32. 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.

  33. 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?

  34. 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…..

  35. 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,

  36. 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

  37. 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

  38. 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.

  39. 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???????????

  40. 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 :/

  41. 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 .

  42. 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?

  43. 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?

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

  44. 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

  45. 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.

Comments are closed.