Folder Lock using cmd

Yes! guys you can lock your private folders with help of cmd(command prompt) no need of third party software to lock your folder. To lock your private folders you have to follow these some simple steps.

Step 1:- Copy and paste this all code into your notepad and enter your own password at the place of "YOUR_PASSWORD" in code. Now save it as .bat file in your directory.

cls
@ECHO OFF
title Folder Locker
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%==YOUR_PASSWORD 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

Step 2:- After saving this file as yourname.bat. Run your bat file and it will generate a folder name "Locker" in your directory. Now copy your data in this folder which you want to save of protect from others. Now again run bat file, now it will ask to lock your folder. So type "Y". Now your folder is hidden now.

Step 3:- If you want to see your folder, so you have to run your bat file again and now it willl ask you to password which you enterd at place of "YOUR_PASSWORD" in code.
Enter your password and folder will appear again.

Comments

Popular posts from this blog