74.gif

Search (advanced search)
Use this Search form before posting, asking or make a new thread.
Tips: Use Quotation mark to search words (eg. "How To Make Money Online")

05-08-2021, 08:32 PM
Post: #1
Lock / Unlock folder with cmd !!!
Create a folder, name it, then open it.
Create a new text document, name it, then type the following or copy and paste it:

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

Then change the PASSWORD_GOES_HERE to anything you want – it'll be your password. Save the text, then change the TEXT DOCUMENT.txt to Locker.bat.

Double click the Locker.bat. This will create a folder called Private. Then put the things you want to lock in it and go back and open the Locker.bat.

If you want to lock the folder type y then hit Enter. The Private file will disappear. If you want to open the private file, open the Locker.bat, type your password then hit Enter.




90.gif