In this tutorial you will learn how to lock a folder in windows 10, Windows 8,Windows 7 without a software
Follow the below steps to lock a folder in windows. without a software.
Read Also
HOW TO PUT A PASSWORD ON YOUR PENDRIVE/EXTERNAL DRIVE
STEP 1
Search for Notepad on your pc and click to open it.
STEP 2
Copy and Paste the following codes inside the notepad and save the files as locker.bat in small letters at the exact location where the folder you wish to lock is located.
cls
:End
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Press Y to Lock this Folde or N to Cancel(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 Succesfully!
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 The password entered is wrong!
goto end
:MDLOCKER
md Locker
echo Locker folder created successfully
goto End
STEP 3
Open the notepad file and double click to run it. When you double click, a command prompt window will pop up and a new folder with the name Locker will be created at the same location. Copy all your files and folders you wish to lock into this new folder. In the command prompt window that appears, press y on your keyboard to lock the file. The locker folder that contains your files will disappear and be hidden after you press y in the command prompt window.
STEP 4
If you wish to unlock or show the folder, double click on the locker script again. The command prompt will open,
enter 12345 as the default password and hit enter, the locker folder containing your files will show up again. If you wish to change the default password, locate this line in the script if NOT %pass%==12345 goto FAIL and change the 12345 to any password of your choice and click save.
This is the great fun and usable trick for save your data