How to Lock Folders in Windows 10 (Without Software Installation)
We Lock or Hide our
Personal folders in Windows using Third-Party Software, but we can lock or hide
our folder (Files, Images, Music even Videos) with out any software
installation just using a simple command prompt code.
1st Step : Right click on a folder which one you
want to hide and select New > Text Document, just give any name to the
document we will work about it later.
In this example i am
selected My Folder to lock.
2nd Step: Open the created new text document and
paste the below code.
Code for Folder Lock::
cls
@ECHO OFF
title My Folder
if EXIST
"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST
Secure 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 Secure
"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 the
Password to unlock folder
set/p
"pass=>"
if NOT
%pass%== windows10 goto FAIL
attrib -h -s
"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren
"Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Secure
echo Folder
Unlocked successfully
goto End
:FAIL
echo Invalid
password
goto end
:MDLOCKER
md Secure
echo Secure
created successfully
goto End
:End
3rd Step: In this code we need to set our password in
the password section. (which is in Green color with
underline). give a desired password name for your lock folder in that place.
4th Step: Select File Menu and Choose Save As Option
and give any desired name for your file with a .bat extension and Set Save as
type as " All files and click save.
[.bat means batch code
- It is an internal command of MS-DOS]
5th Step: Double Click on that batch file which you
created in the 4th step. Choose Y or y in the command Prompt and Press Enter.
My folder is gone, which is disappeared from File explorer.
6th Step : To retrieve your hidden folder just
double click on .bat file and enter your password which is set in the 3rd step.
Voila Your Hidden Folder is Appeared again.
Thanks for post I will give it a try
ReplyDelete