It's true! You can very easily lock any folder without any Software(s). Just follow my Instruction.
Note: If you are First time to this Trick, Try this with a New folder.
- First, Copy the Following code:
cls
@ECHO OFF
title Folder Private
if EXIST "HTG Locker" goto UNLOCK
if NOT EXIST Private 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 Private "HTG Locker"
attrib +h +s "HTG Locker"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== PASSWORD_GOES_HERE goto FAIL
attrib -h -s "HTG Locker"
ren "HTG Locker" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
- Paste the above code in a Notepad & Change PASSWORD_GOES_HERE with a Password that you want to put for the Folder.
- Now, Save the Notepad by giving the name as locker.bat
- Now, Click on locker.bat File. You'll see a File named "Private" as shown in Below screenshot. Move your Folders that you want to keep Private to this 'Private' folder.
- Now, Again click on locker.bat file. Now, You'll be asked that you want to Lock the folder in a Command Prompt box as shown below. Type "Y" and Hit enter.
- The 'Private' folder will disappears! When you want to unlock the Folder, Click on locker.bat file and Enter the Password. Then, the 'Private' folder will appears!
That's it! If you have any doubts, Drop a comment :)