In my previous post I have discussed about how to hide folder name and icon without any software. Today I shall tell you how to lock a folder with password without any software. Only you need to create a batch file. So follow the steps.
- Open a Notepad. Copy the code below and paste it into notepad.
- Save as the notepad as NAME.bat (E.g. Folder_lock.bat).
- Keep the batch file (Folder_lock.bat) in any hard drive or on the desktop and double click on it. It will create a new folder locker at the same location.
- Keep the files that you want to hide and also lock with password into the folder locker. If you want to unlock your files then double click on the batch file again and type Y (for yes). Here I set the password 12345. You can change the password by editing the batch file.
cls
@ECHO OFF
title Folder LockerByPrabirGhoshIndia
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker 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 Locker "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%==12345 goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
how do i make the password invisible when i type it in?
Nice post,
But if we see Hidden files, the folder is visible with another name.
anyone can edit the password
Yes, anyone can change the password and if you enable hidden file visible [hide protected operating system files (recommended)] then you could see the file named as Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}. Actually it is a basic tip to hide a folder with a password which is controlled by a batch file.