Lock your folder with a batch file

You can make the folder lock software by your own.
Just Copy and paste the following code into a notepad and save it as a batch file (i.e. with ".bat" extension).
Then close the notepad and click the batch file. It creates a folder with name "Locker" in the same location.
Now paste all the folders and files which you want to hide into the "Locker" folder. Double click the batch file and enter 'y'  or 'Y' to lock the folder. It will locks your folder.
If you want to unlock your folder, double click the batch file again and you would be prompted for password.
Enter the password and access your files


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
cls
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}"
cls
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%=="your password" goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
cls
echo Folder Unlocked successfully
goto End
:FAIL
cls
echo Invalid password
goto UNLOCK
:MDLOCKER
md Locker
cls
echo Locker created successfully
goto End
:End



In the above code change the "your password" with your password before saving as batch file(remove the double quotes also) It is the password to unlock your folder

Gopikrishna

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment