Password Protect folders in Windows without any Software

Most of us have private data. Not all of us have a private computer to keep that data. Most of the time, we end up with other people viewing that data. Although password protecting software do work, it is almost pointless to hide private data with these software (because we are always questioned as to what it is that we are hiding with them).

Hidden folders do not work as anyone can use Folder Options to make a hidden folder visible. So, we need an alternative way to create hidden password protected folders and that is exactly what we will learn in this post.

With this trick, you can create a secure password protected folder in Windows with some basic batch file coding. To use this trick, follow the instructions given below:-

1.  Open Notepad.
2.  Copy and paste the exact code given below:-

cls
@ECHO OFF
title www.tweakandtrick.com
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST MyFolder goto MDMyFolder
:CONFIRM
echo Are you sure to lock this 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 MyFolder "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 your secure folder
set/p "pass=>"
if NOT %pass%== www.tweakandtrick.com goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDMyFolder
md MyFolder
echo MyFolder created successfully
goto End
:End


Hide Folders without any Software


3.  Click on the File Menu. Click on Save As.
4.  Select All Types in the Save As type dropdown menu. Save the file as *.bat or Locker.bat.


After creating the file, double click on the Saved file. A new folder will be created at the same location as the batch file. Enter your data in the folder. Again, double click on the batch file. Type Y and press Enter. The folder will be hidden from view.

To re-view your folder, double click on the saved batch file. Enter password as "www.tweakandtrick.com" without quotes and press Enter. This is also the default password. Your folder will be visible again.

To change the default password, edit the part of the code given in blue and enter your own password.

The overall usability of this trick can be improved by deleting the batch file after hiding your folder and re-creating it at the same location when you wish to access your folder again.

Note: This works on Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista and Windows XP. First try this on useless data to be sure and then only hide your personal data.

Update: Try new Folder Lock for a more secure way of locking folders.

Reader Comments

Anonymous said...

its really wonderful
akhilesh u really rocks.
shivi

Martin said...

How do you see the folder u created. And also how can you protect an
existing folder

Akhilesh said...

Hi Martin, you must again open the batch file and it will ask you to enter your password. Enter it and the folder will be visible again. To hide an existing folder, just copy it in the Locked Folder.

Anonymous said...

how do I double click and press Y?? When i double click, the folder opens...

Akhilesh Sharma said...

You have to double click on the batch file, then, it will ask you to press Y or N. If you press Y, the folder will become invisible.

Unknown said...

It's neat but it just hides it. Anyone that knows how to simply show hidden folders will find it. :(

Akhilesh said...

No, this folder can not be viewed by simply showing the hidden files. The batch file changes the folder's name to that of a system file leading to invisibility of the folder. So, you can be sure about its efficiency.

Anonymous said...

ur really great

http://www zaffar khan.blogger.com/ said...

I this zaffar whin i double click on the batch file, (then, it will ask you to press Y or N). If you press Y, the folder will become visible. is not hide
and also i change folder option do not show hidden files and folders
so what can i do.

Akhilesh said...

After pressing Y, you have to press Enter. If you want the folder to reappear, again double click on the batch file, enter your password and press Enter.

Anonymous said...

When i open the batch file something just flashes on the screen and there is no new folder where does it create da new folder or what hav i done wrong?

Akhilesh said...

Either your PC is a infected by a virus which is stopping the command prompt or a security software might be blocking it.

Author About

Akhilesh Sharma maintains and writes Tweak And Trick. He is a technology enthusiast and a science student.
You can contact him at tweakandtrick@gmail.com.

read more >>
Featured Posts