How to Secure Your Folders Without Software: A Simple Step-by-Step Guide

ssnmd
Dear All,

Good morning. Here is the procedure to lock your folder without any software. Please try it out. I hope you find it very useful.

To lock a folder without any software:

Open Notepad and copy the code below. Save the file as locker.bat. When you run it for the first time, it will create a folder named Locker automatically for you. Don't forget to change the password in the code where indicated.

After the Locker folder is created, run locker.bat again. It will prompt you to press Y, and then the Locker folder will disappear. To access the folder again, simply run locker.bat and enter your password.



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 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 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 the 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



Noor
Swati.hr
Hi Noor,

Excellent work!! Very useful for everyone. Actually, I wanted something like this to manage my folders. Your post helped me a lot. Keep on posting stuff like this.

Cheers,
Swati :)
Pankaj Sharma Jaipur
Dear Mr. Noor,

Apparently, it seems valuable, but the same gets opened even if you do not put your set password. It accepts everything to open, which is a threat to security issues. Please update me if I am making any mistakes in following you.

Regards, Pankaj Sharma
Swati.hr
Hi Noor,

There is a bug in this program. It opens with whatever text you enter as a password. Then the folder won't be secure. Something should be done to make the program secure.

If this bug is fixed, then that program will be secure and useful.

Cheers,
Swati
Swati.hr
Hi Siva,

That program is about locking your folders. You can keep your documents safe and secure using this program. It can be opened only by you. You can save all your confidential documents in this folder, lock it, and unlock it by entering your password.

However, there is a bug in this program as it opens with any password. If anyone skilled in programming can fix this, then it will be a secure program.

I hope I have made you understand what this program is about.

Cheers,
Swati :)
senthilos
Hi,

Thank you for the brilliant post. However, even if I enter the wrong password, it is still working. I set "password1" in the field where you type your password, but even if I type "password2," "asdasd," or "asdasd," the folder still opens.

Any suggestions, please?
bagema
This problem is like this:

```bash
if NOT %pass%==type password here goto FAIL
```

In this line of the program, you need to remove "type password here" and enter your password. Now, try this. It won't open with any other password.
bagema
Not only can you change the name of the folder, but you can also follow these steps: Open the program, go to the Edit menu, select replace, then type "Locker" and replace it with your preferred name for the folder. Save the changes, and you will have the folder named as you wish.
amitkumargautam1982@gmail
Dear All,

There is a problem in the program: when the folder is shared, it appears on all network systems. What I want is for this folder to require a password for other users to access it, ensuring the files within the folder remain safe.

Please help, as this is very important to me.

Thank you,
Amit Gautam
HR-Executive
talk2kris
User input:
Dude,
The tip was very good.
Can you explain technically what is happening?
And any suggestions on how to hide and retrieve the locker.bat file itself, or any other way/tip so that no clue is left that the folder existed and is now locked?

---

Corrected version:
Dude,
The tip was very good.
Can you explain technically what is happening?
And do you have any suggestions on how to hide and retrieve the locker.bat file itself, or any other way/tip so that no clue is left that the folder existed and is now locked?
bhatils
No doubt this is working, but it is very easy to find the password of the folder. Right-click on the batch file and click on "EDIT". Once again, the notepad will open. Here you can easily find the line showing the password:

if NOT %pass%=="your password" goto FAIL

So, in a nutshell, it is still prone to easy hacking.
r.karthikkeyan
Hi, this is Karthikeyan. Wow, what an amazing program! But one thing I wanted to tell you - could you please think a little more and help me? The folder is getting locked, but we can still delete the folder. Could you please think carefully and ensure the folder cannot be deleted if it's locked, similar to how we can't delete the "System Volume Information" in an NTFS drive.
gtr100
"Urgent Help"

Dear Noor,

According to your software, I changed and created a file. It was working like a game of Hide & Seek, but suddenly I am unable to open the file even though I am using the same password.

GR
gtr100
Dear Noor,

After creating the folder, I transferred my files, about 400MB. Now the program is not working. Please tell me how I can remove that program. If I simply delete it, I will lose all my data and files.

Please help me out.

GR
harshitha
Hi all,

This didn't work. I followed the same procedure, created a folder, and set a password. When I tried opening this from another system on the LAN through RUN, the folder is visible only when "view hidden files" is selected. My colleague can also open the folder.

:(
byomjeet
Dear Noor,

It worked really well. Thank you very much. However, anyone can change the batch file and change the password or delete the file. Is there any way to protect the batch file as well?

Regards,
Byomjeet Mishra
joydeep25
Dear Sir,

I have copied the code in Notepad, saved it as "locker.bat" on the desktop. However, when I double-click the file, it does not open. Could you please explain to me how it works in detail?

I apologize for any inconvenience this may have caused.

My email ID is joydeep25@gmail.com.

Thank you.

Sincerely,
Joydeep
joydeep25
Hi all,

I would like to add one thing. Just right-click the batch file and tick the hidden option; it will disappear. To get it back, search for that file from the start menu and again right-click the file. Untick the hidden option, and it will appear in its place. I hope this will add more security.

Thanks,
Joydeep
lakshmangrandhi
It really works, but it's working with any password. I mean it's not taking a single passcode; it works with any code you give.
chefsubodh
Hi Noor,

FANTASTIC!
It REALLY works! I tried using various other passwords, but if you take precautions of entering the desired password BEFORE saving this dat file, it works.

Thank you,
Keep posting stuff like this...
prasadaraopuli
When the batch file is opened in edit mode or edit with Visual Studio mode by right-clicking, a password appears. How can this bug be resolved?
fouzia.parveen
I am not able to figure out where to change the password in the code. After naming the file locker.bat, what is the exact next step to follow?
chetancsrao
Please clarify where we need to type our password and where the locker.bat file is located. I am having trouble finding this in the "Save As" options. Could you please provide more guidance on where to input the password and locate the locker.bat file? Thank you.
murugabadi
Dear friend,

This works well. It is amazing, and I have been looking for something like this to do. Thanks a lot. However, even though the work is being done well and protected, anyone can open it. I mean, anyone can access the password by right-clicking the locker file and choosing to edit. Has anyone checked this?

Thanks,
Murugabadi
ratneshpandit
It's a really nice post.

But dear professionals, this is a simple yet tricky programming code. Anyone who knows the scripting can break this code (hack the password) and access your Locker Folder.

Go for simple freeware software to lock your folder/file.
krishna.gettam24m
Hi Noor,

It is meaningless to create such a batch file, as one can easily access the file and know the password to open the folder. However, it's a great attempt.

Bye, take care,
Krishna
If you are knowledgeable about any fact, resource or experience related to this topic - please add your views. For articles and copyrighted material please only cite the original source link. Each contribution will make this page a resource useful for everyone. Join To Contribute