','

'); } ?>

Protect and Lock Windows Folder with Password Without Any Software

lock-windows-folder-with-notepad

With this script you can protect the folder with password and no body can get access to the folder without the password. Here I will show you how to write script as Batch file, and with couple of clicks you can protect and hide your folder with cinfidental files and data.

How To Lock ( password protect ) Folder ?
 
Open Notepad and write ( or copy from here ) code given below into it.

cls
@ECHO OFF
title Secret Folder
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Secret goto MDLOCKER
:CONFIRM
echo Are you sure you 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 Secret “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 the Password to unlock folder
set/p “pass=>”
if NOT %pass%== Type here any password you want goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Secret
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Secret
echo Secret created successfully
goto End
:End

  1. Save the notepad file as secretfolder.bat ( .bat is must be-this is batch file, name it anyway you like )
  2. Now double click on secretfolder.bat and a new folder will be created with name Secret
  3. Copy all your files and data you want to protect in that New folder called Secret 
  4. Now double click on secretfolder.bat and when command prompt window appears and ask do you want to lock the folder type Y and press enter.lock-folder-secret-confirm
  5. Now folder Secret will be hidden from you view, to access that folder double click on secretfolder.bat
  6. It will ask for password,  enter your password and done. ( In the script with red letters type your any password you like, and remember it )lock-folder-secret-password

If you enabled options show hidden files and folders you still will be able to see locked folder. you can see here how to manage with show hidden files and folders option. But still there is some risk. If some body is a advanced computer user then he can easily retrieve your password from your batch file. He can easily see the password by choosing “Edit” option from the right-click menu on the batch file.

So, to prevent this situation you can make an executable file of the batch file. The positive side of the executable file is that no body can’t see the source code of an .exe file. Here is described the process of converting ( compiling ) the batch file to executable file (.exe).

First thing you have to do is a compiler that compiles the batch file ( .bat )  to an executable file ( .exe ). Here you can Download Bat to Exe converter.

Run the application and put the source path of the ( .bat ) batch file, then put the target executable ( .exe ) file name ( name it what you like ) that will be created with location.

Now Click on “Compile”  button.

bat-exe-converter

And That’s all. Now you can delete the batch file secretfolder.bat. You can now password protect or access the folder by using the .exe file (secretfolder.exe for example). Your files and data is now fully password protected.

This method explained here works in Windows XP, Windows Vista and Windows 7.

One Response to Protect and Lock Windows Folder with Password Without Any Software

  1. Really cool post, highly informative and professionally written..Good Job

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

banner