Step 1.
1. Press Win+R in your keyboard (To bring Run command tool)
2. Then type: Notepad
3. Press enter.
Step 2.
You will see notepad
Now type the Codes/Command.
Step 3.
SO THE CODES ARE HERE:
cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST secured goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the secured(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 secured "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s +r +i "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo secured locked
goto End
:UNLOCK
echo put in the key to Unlock the lock
set/p "pass=>password"
if NOT %pass%==123456 goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" secured
echo secured Unlocked
goto End
:FAIL
echo Invalid keyword
goto UNLOCK
:MDLOCKER
md Secured
echo lock unlocked
goto End
:End
NOTE: In 23rd Line You can see the default password i.e., 123456 , so just change this to the password you want.
- So Just write The Codes In a same Way it is written And Save as "all file" type with file name lock.bat or anything.bat
Step 4:
1. When you open that Lock.bat file, it will create one folder name Secured
2. So, copy any files or folders you want to hide and paste/move it to secured folder.
Step 5:
1. Now, again open that bat file and you will see that
2. Asking to lock or not. so, if you want to lock type:Y
3. And the press enter, now you folder is locked or hidden.
Bug: Some Of The Users Told Me That during This Step 5 when we lock the folder, the folder is still seen...
Bug Fixed: So Just Refresh (Press Ctrl+F5) it once in desktop or in the location where you are trying to lock that file...
Step 6:
1. In order to get your file back, open the bat file again. So now you can see something like this
2. Since here the default password i set is 123456, which you can change easily before running the program, which i already explained in Step 3.
3. Press enter, you file will be right there.
http://www.instructables.com/id/How-To-Lock-Folder-Through-CMD/
1. Press Win+R in your keyboard (To bring Run command tool)
2. Then type: Notepad
3. Press enter.
Step 2.
You will see notepad
Now type the Codes/Command.
Step 3.
SO THE CODES ARE HERE:
cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST secured goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the secured(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 secured "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s +r +i "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo secured locked
goto End
:UNLOCK
echo put in the key to Unlock the lock
set/p "pass=>password"
if NOT %pass%==123456 goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" secured
echo secured Unlocked
goto End
:FAIL
echo Invalid keyword
goto UNLOCK
:MDLOCKER
md Secured
echo lock unlocked
goto End
:End
NOTE: In 23rd Line You can see the default password i.e., 123456 , so just change this to the password you want.
- So Just write The Codes In a same Way it is written And Save as "all file" type with file name lock.bat or anything.bat
Step 4:
1. When you open that Lock.bat file, it will create one folder name Secured
2. So, copy any files or folders you want to hide and paste/move it to secured folder.
Step 5:
1. Now, again open that bat file and you will see that
2. Asking to lock or not. so, if you want to lock type:Y
3. And the press enter, now you folder is locked or hidden.
Bug Fixed: So Just Refresh (Press Ctrl+F5) it once in desktop or in the location where you are trying to lock that file...
1. In order to get your file back, open the bat file again. So now you can see something like this
2. Since here the default password i set is 123456, which you can change easily before running the program, which i already explained in Step 3.
3. Press enter, you file will be right there.
http://www.instructables.com/id/How-To-Lock-Folder-Through-CMD/