Skip to main content

Hiding And Locking A Folder Without Using or Buying a Software

I found this simply neat tutorial years ago, tried looking for it again but have no luck finding it, so I’m posting here what I’ve got left from that tutorial and hope you’ll find this little script handy in hiding and protecting your important folders from prying eyes.

  1. Make a folder and name it whatever you want.
  2. Inside the folder, create a text file (.txt) and copy / paste the entire code below to the text file.
Quote:
Quote: cls
@ECHO OFF
title Folder Private
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private 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 Private "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%== password here goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
  1. After copying the code to the text file, find/search for the phrase (line 23)
if NOT %pass%== password here goto FAIL
  1. Change “password here” with any password you like. e.g. your password is PW123456, your line 23 code will look like this
if NOT %pass%== PW123456 goto FAIL
  1. Save the text file as “locker.bat” or save it as a text file and then rename the file as "locker.bat"
  2. Double click your Locker file (locker.bat) and you will see a new folder appear (Private folder)
  3. Copy whatever you want inside this “Private folder”. Then, double click your Locker file again, It will open a window and ask if you want to lock your folder? Y/N ?
  4. Just type Y for yes and the “Private folder” will disappear together with all the files inside that folder.
  5. to unlock or unhide the folder, just double click your Locker file again, supply your password, and the folder will reappear.

NOTE:

  • Don’t forget your password, doing so may permanently hide/lock your Private folder and I don’t know if there is any way to recover files you hide this way.
  • You can also do this on your Flash Drive. just perform the steps above in your Flash Drive instead in your hard disk.
  • In case you accidentally delete your Locker file, Just create a new one using the same password you used in your old Locker file and unhide the Private folder from the new Locker file.
  • Still feeling paranoid, for added protection, you can move the Locker file somewhere else, just copy it back to the folder where you have your Private folder with hidden contents and open it from there.
  • Finally, if you have no problem installing additional software in your computer, you can google for a software doing a similar function. You’ll be able to bump into some free and commercially released apps. What’s the advantage of the above script? There is nothing to install so you can be sure you are free from any kind of spyware.
X
Loading