In my previous blog entry i posted about how to hide your folder without any software,
Now, I want to show you a better windows XP’s trick which I learned it from Digital Quest. Now , you can create an invisible folder with security protection. You will need to provide password to reveal and open your folder.
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.
[ad#ads-inner]
HI,
The things you have mentioned is not working. its not hiding the folder. Check the code again.
bye
it is wasting of time it is not working………
The things are not working out.Pls check it again.
yes it works wonderfully, but i created a folder in my “F” drive and “c” is formated as windows got corrupted, now i am not able to find my folder. pl help
I tried this .bat file, sorry dosnot works. The folder “Personal” dosnot appers at all.
Do you know to write a correct, very simple *.bat file program in DOS? I don’t think so.
The third line for you is a REMARK line, but the program Interprets it as an executable line, you missed something there. Do you know “rem” command?
Do you know that your “MENU” routine using the “set/p” command doesn’t work with every DOS version.
The only thing i can see is, an enthusiast of DOS version 6.22 ERA, trying to mess up with other’s computer. Don’t forget that DOS programs are very powerful, and many VIRUSES are written in “DOS PROGRAMS”.
For correct working of this .bat-file you have to replace all paired quotes to simple ones (“ and ” to “)
For example:
change
“Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
to
“Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
As it turned out, it is impossible to show correct simple quotes in the comments, but I hope you understood what I meant in my previous comment.
Hey dude,
Personal folder is created but It does not ask me for password
so check code again…
its working but can you tell me if i dont want to hide folder; it should ask for the password when ill click on my folder called as Personal & not on batch file.