In my previous blog entry on how to hide your folder without any software, several readers commented that the so-called “invisible folder” can be easily make visible if you unchecked the “hide protected operating system files” in the folder options and once visible, anyone can access the folder with ease.
Now, I want to show you a better windows XP’s trick which I learned it from Digital Quest. Still, you will learn how to create an invisible folder but now with security protection. You will need to provide password to reveal and open your folder. You will do this without using any software.
If you are interested, just follow the instructions below.
- Copy and paste the following code into Notepad.
- Save the file as secret.bat ( or whatever name that you prefer but make sure the file end with .bat extension )
- Move secret.bat batch file to the directory that you want to create your protected folder.
- Run the batch file by double-clicking it. A folder with the name “Personal” will be created.
- Now, you can insert any file into the folder.
- To lock the folder, you need to run the batch file again. A command prompt will pop up and asked whether you want to lock the folder. Key in ‘Y’ (for Yes) and hit Enter. Your folder becomes invisible.
- To unlock the folder, run the batch file. You will be prompted to enter the password. Enter the password (default = pwd123 ), hit enter. The folder appears.
cls
@ECHO OFF
title Folder Personal
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Personal goto MDLOCKER
:CONFIRM
echo Are you sure u 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 Personal “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%==pwd123 HERE goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Personal
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Personal
echo Personal created successfully
goto End
:End


You can change the name of the password-protected folder. You need to edit the batch file before you run the batch file for the first time, replace the word “Personal” with your desired name. There is a total of 6 words to replace. If you don’t prefer the default password, change the “pwd123″ with your desired password.
Note : Anyone can open the batch file and view your password. For precaution, you might want to keep the batch file on separate directory or on pen drive. When you want to open the password-protected folder, you can copy the batch file to the location where you keep the protected folder and run it.
Recommended : Defense Your Windows Against Spyware/Adware




it doesn’t work with vista?
shen > I don’t know because I’m using XP. You can try it yourselves and let us know.
Steve,
Good tip. Keep coming with more tips in future…
Nihars last blog post..Great Civilizations of Ancient World
cool! but I wonder if we can encrypt the password in the source .bat file so that i will not be visible.
needing to move this file away to protect it is troublesome
So trouble some :’( I guess it’s worth it if you really have important stuffs on your computer hehe
Michael Aulias last blog post..Mass Effect FREE downloadable content for PC
hi! i run the batch file and created the folder..the problem is whenever i try to re run the batch file to lock the folder, the command prompt appears and when i hit the Y, the folder still visible and unlock..please help..there must be wrong with the codes.
YHAD > You try re-type this sign ( ” ) in the code. I’m sure it will working now.
hello dear
i know many tips from u and from your site. thank you
It is some thing helpfull but not workinvg properly because of any wrong code u plzz check it and let me inform u can send me the correct code as a email my email address is buneet@yahoo.com i realy nead this so plz try to help me out
Buneet > You need to re-type this sign ( ” ) in the code.
Please let me know how to open the file thru RUN
this is good but there is a disadvantage. the hide function will not perform when the data inside the folder was link to other file outside the folder…
please let me know if someone can modified this code that will help to solve the problem stated above. thanks…
I did everything– but I can not unlock it now–what should I do
do everything like debugging manually line by line to retype the ” character…
hi!!! i run the above batch file its working. At first it was’nt work but i retyped the ” character and tried it works.
thankyou steve yu
Very cool! it works!
Right click the batch file and use edit option to open the file. Now copy –> “ and use ctr+h to replace all with ” and also copy –> ” to replace all with ” and then save it. And run the batch file now it works fine
Ok, when I unlock the folder, it opens up control panel. I run on windows xp but got new updates for it today – could that be an issue? I cannot locate my files.
I can’t creat password as your tips
Hi There,
After weekend login when i click on batch file my personal folder visible without showing password window n there in no more data in personal folder.I have lost my data from personal folder how can i recover my data plz suggest me somthing there is all major official details which i have lost……
Waiting here
regards
Anil
I tried this but it dint just work
I dont no if i was getting something wrong, but I followed the steps over and over again but to no avail.
Please help!
it worked for me..replace all the double quotes with your keyboard double quotes.
at this line:
if NOT %pass%==pwd123 HERE goto FAIL
delete “HERE”
If you want it to loop if the password is not correct, at this line:
echo Invalid password
goto end
replace those with these:
echo Invalid password
goto UNLOCK
hope this will help
nice application…keep going.. kudos for you my frend
It’s wont work
i have edited the file it works it runs but will not unlock i did not change the password i just type it the file closes and it remains a control panel shortcut please help.