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.
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.
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.
I was looking for a software to lock folders with passwords but i found this on Facebook. Thanks for sharing.
super work friend,
now I have to no worry about the folder lock
Hello
I did as you said but problem is in the search all the document and files is visible.
How someone is gonna know the exact filename of your personal files. Keep some irrelavent file name or else you any software.
pls help explain at how to unlock at my folder lock password…forget my password
that was great from u srinu….it was really useful for me
Thanks for the compliment sai.
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?
You should not delete the code. Again create the file with same name an run it then enter the password.
does it only put to hidden?
No. If you hide files you can view them but if you use this no one can’t open without that password.
if a torrent is downloading in this folder…. will it continue to download after locking????
Sorry Husni, I didn’t try that.
AMAZING !!!!!!!
hi, Srinu..really nice work
but i didnt get how to change the password..kindly help me for that
Right click on the bat file and choose edit. Now, replace the old password with the new one. That’s it .
there is a problem that anyone can delete this notepad file
Keep a copy of this file or else you can create new one anytime from this article.
Thanks you so much. It is really useful for me.
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
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?
Keep that batch file some where else like pendrive.
Heyy, em still unable to put on my own password, how exactly i can do that, where’s the blue snippet up there?
Check out the image and edit the highighted part. link for image –>
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
You refresh the folder then it will go to hidden state.
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
Actually some problem with Windows 8.1. Soon I will write one more article to lock your folder in Windows 8.1 with Password.
Ok thank, look forward to it!
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.
why d’t bat lock my pc
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
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 :/
I have forget my password….pls help me
open the file that you have created. your password will be there. Check out the article last sections.
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.
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?
You can change that folder name. Search for myfolder in the above code and replace it with any folder name.
Sorry, just commented in the wrong place, please check the other one if you have time. Thanks
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???
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
hi, Srinu..really nice work
but i didnt get how to change the password..kindly help me for that
hey, but when we search for the file name it is still accessible. please fix this
It is well, but while I delete the file *.bat then the folder that I want to hide is visible.
Its works nice.
But how could I make my password invisible while typing?
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
Excellent trick…. thank u…..
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
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?
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.
Thx Bro ,That really workeD.
Gud one bro…….R u sure tat I wont lose any data ??
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.
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.
It really worked for me.
Brilliant Job mate…..cheers!!!!
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?
Works great, will files transfer straight over if I change computer and transfer via a backup?
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
just type your folder name in search box.
I cant see My Folder after entering he password (Happened after a system crash )
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
can we simply delete this folder?
Thanks bro…..
it`s sucessfull
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 🙂
If windows crash some how, can we get our protected data again?
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 ;(
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…
Great, Show the way so to protect with password while any person delete bat file or folder
Nice work, but please enter a code line in your program which can hide the password alphabets like ******. thanks!
THANKS YAR….
Thanks Dear, Its really work on my windows8.1 , thanks alot.
how could I make my password invisible while typing?
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.
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????????????/
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.
all the things are OK but if someone delete the .bat file . how to get the folder back .
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?
Hai..Thank you dear
How can i get my documents back when i delete the anytime thing?
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
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 😉
Yeah. it’s just a little trick. not 100% secure way.
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
i cant change the pass plz tell me how to change
hi,
if we search that my folder in search option then unfortunately it displays everything…
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.
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?
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…..
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,
this is simple code. It can’t help you in your situation but you can use some software.
Thank you guys so much
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
i cant find my files even though i have unlocked the folder. its EMPTY!!!
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
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.
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???????????
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 :/
Just search for that folder name.
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 .
is this code secure?? will it harm my security through network..?
thanks for your trick.its working. how can we lock the folders in other local drives
Very Nice ! Amazing!!
Srinu problem is that the folder is not hiding…!!! I’m using windows 8.1 please help me out
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?
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?
I have forgotten my password 🙁 is there any way to recollect ?
don’t worry. Just again create the same batch file and run it. You will get ur folder. Hope it will help.
Great ! thanks dear.
it’s work!!! ..very easy steps ..thank u
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
Yeah.you’re right.
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.