Be Smart, Be Technical

Dedicated Server

CMD Folder Locker Code – Private Folder With CMD

In this article we are going to post some extra smart trick, that will help to Create a Private folder and store the content.

Complete code of CMD to create a Private Folder that will lock and unlock with password. 

First you have to create A CMD batch command Code and save the file with .bat extension. The Code Is Given Below.


Step 1 : Open Any Text Editor App (Notepad or Notepad++)

  • Type the below code In text editor app : 
title Folder Private  By
if EXIST "HTG Locker" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
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.
ren Private "HTG Locker"
attrib +h +s "HTG Locker"
echo Folder locked
goto End
echo Enter Password To Unlock The Folder
set/p "pass=>"
if NOT %pass%== 11223344 goto FAIL
attrib -h -s "HTG Locker"
ren "HTG Locker" Private
echo Folder Unlocked successfully
goto End
echo Invalid password
goto end
md Private
echo Private created successfully
goto End


Note : Please Replace The 11223344 Text With Your Password. 


Step 2 : Save the file with any name by using the .bat extension. (Do not use .txt).

Click On The Download Button To Direct Download The Batch File. (Default Password Is 11223344)

Download Now


Step 3 : Move the file to that place where you want to create the private folder. 


Step 4 : Just open the file. It will open the CMD and automatically close after creating the Private folder.

VPS Hosting


Step 5 : To Lock And Unlock the folder Use The batch file. If Folder is unlocked it will ask to lock or unlock or if folder is locked it will automatically ask for password to unlock.


Note : If you lost the password then just edit the batch file and change the password from the code. and save that.

Your password will change.