How to lock a folder without a s/w

How to lock a folder without a s/w??

Many people have been looking for an alternative way to lock folders without the use of any software. So, here you go.

 Open Notepad and copy the below code and save as locker.bat. Please don't forget to change your password in the code it's shown where to type your password.
Now double click on locker.bat
When you start the first time, it will create folder with name Locker automatically for u. After creation of the Locker folder, place the contents u want to lock inside the Locker Folder and run locker.bat file again.

Below is the code which u need to save in notepad file:

cls
@ ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u 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 Locker "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 password to Unlock folder
set/p "pass=>"
if NOT %pass%== type your password here 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 Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End

 

Replies (46)

It's really good... thanks

 

It's really good... thanks

 

plz tell me can this method be applicable for folders only...

Aslo, plz tell me if we will cut and paste the folder to other drive.will this lock property will remain same na...

bingo.........yaar, its awesome thanks 4 that

shafi

Yes Sachin, This method is applicable for folders only...

cut, copy and paste will not delete its locking properties....

admin plz make note..why the last msg was submitted 3 times..

Apurva, It is easy to edit .bat and get the password.

 

Please help on saving the notepad as "locker.bat.".

 

I am understanding it. Should I name the notepad as locker.bat.

It Very good

Thx

sir please can you tell me what it password in this format

i have created but i am not gretting password

 

Dear Apurva

 

Yes it is very good way to keep our documents safe.

 

Thanx

Sumit soni

Dear Apurva,

 

Yes it is very good way to safe our documents easily.

 

Thnx &  Love

Sumit Soni

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
23 October 2026
Sr. Accountant

SANKARAN & KRISHNAN

New Delhi

B.Com

View Details
Company
ARTICLESHIP 14 November 2026
Article Assistant

Jitendra Agarwal & Associates

Bengaluru

CA Inter

View Details
Company
31 October 2026
Accountants

sankaran and krishnan

New Delhi

B.Com

View Details
Company
12 November 2026
Tax Product Specialist

BharatX.ai

Gurgaon

B.Com

View Details
Company
10 November 2026
FP&A Executive

Gujarat Guardian

Ankleshwar

CA Final

View Details
Company
Featured 07 November 2026
Paid Assisstant

DPV & Associates

Chennai

CA Inter

View Details
Company
Featured 07 November 2026
Chartered Accountant

DPV & Associates

Chennai

CA

View Details
Company
12 November 2026
Auditor

Oz Taxation

Vijayawada

Graduate (Any)

View Details