Maximum PC

For All Tips and Tricks for Windows

Wednesday, February 02, 2011

How to Lock and Hide Folders in Windows Without Additional Software?

Posted by Shamim Imtiaz Khan





 This article is regarding privacy. Many try to find and install software to lock and hide private folders in the PC. But here is an easy method of locking and hiding folders in windows without any additional software.

So, How to Lock and Hide Folders in Windows Without Additional Software?

Follow these steps:


For those who have few technical knowledge follow the steps below:



1) Download the file Locker.bat from Here. 



2) Unzip it then Double click on Locker.bat


3) It will create a new folder called ‘Locker’ automatically. (If you want the file name to be different right click on Locker.bat and click Edit from the manu. A text file will open. Now find out 'locker' from the text. Replace  'locker' by name of your choice). This new locker folder will be created in the same hierarchy/place as the .bat file.






4) Now Place the contents/folder that you want to hide inside the locker folder and double click Locker.bat, it will ask whether you want to lock. Type ‘Y’ and now your folder will disappear.








5) To view again, double click Locker.bat again and enter password '12345'. (You can change the password at any time. To change the password right click on Locker.bat and click Edit from the manu. A text file will open. Now find out '12345' from the text which will be somewhere in the middle of the text file. Replace  12345 by your desired password).




You will see the folder Again.

                                                                                                              


Guide For the user who have Technical knowledge


1) Open Notepad and copy the contents of the code below. (Or Click Here to get the code in .doc format)

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


2) Change the password by replacing ‘type your password here’ in the code with your password.
 
3) Save it as XYZ.bat (Note: Try to be innovative and save it in such a way that it sounds like a system file so that nobody will try to bother clicking it)

4)  Close the file if it is still opened and double click XYZ.bat


5) It will create a new folder called ‘Locker’ automatically. (If you want the file name to be different right click on Locker.bat and click Edit from the manu. A text file will open. Now find out 'locker' from the text. Replace  'locker' by name of your choice). This new locker folder will be created in the same hierarchy/place as the .bat file.

6) Place the contents/folder that you want to hide inside the locker folder and double click XYZ.bat, it will ask whether you want to lock. Say ‘Y’ and now your folder will disappear.



7) To view again, double click XYZ.bat again and enter your password.


Frequently asked questions (FAQ):

1) What if I no longer want to hide the folder?

Just delete the XYZ.bat file when the locker folder is in visible mode. Or you can rename the Locker folder to something else and the next time if you double click, it will create an empty Locker folder.

2)  What if I deleted the .bat file when the Locker folder is not hidden?

You can download the code again, change the password and create the XYZ.bat file. Now paste that file in the same hierarchy as the Locker folder. It will work as before with the new password.

3) What if I deleted the .bat file when the Locker folder is hidden?

The contents are still there hidden, so don’t panic! Just download the code again, change the password and create the XYZ.bat file. Now paste that file in the same hierarchy as the Locker folder is hidden. Double click the .bat file and you can unlock the Locker folder with the new password.

Note: This trick is only to provide Privacy, so that nobody accidentally opens your private folders. It does not provide any ultimate security. Anybody can open XYZ.bat in any text editor and view the code. As I had mentioned it before try to keep this file in not an obvious place with a name that looks like a system file, so that nobody will have a chance to touch or doubt at this file.

Enjoy