bumcheekcity.com Header Image

Lock a Folder in Windows XP


Say you have some files you don't want anyone to see, and that you dont want to install a third party program to hide them. Just follow these instructions, and you can have a simple way of totally hiding a folder.


  1. Copy the text at the bottom of the page and save it as a .txt file, inside the folder you want to lock.
  2. Open it in Notepad, and locate Line 23. Change "password" to whatever you want the password to be. Save the file.
  3. Change the extension of the file from .txt to .bat, then double-click and open the file.
  4. It will create a subfolder called "Private". Move any files you want kept private there.
  5. Once you've moved the files, double-click the .bat file again. Answer "y" when it asks you, and the file will disappear.
  6. If you want to see the files again, simply double-click on the .bat file, and type in your password.
  7. Hey Presto! Your files reappear!


The Code



title Folder Private

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK

if NOT EXIST Private goto MDLOCKER


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.



ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

echo Folder locked

goto End


echo Enter password to unlock folder

set/p "pass=>"

if NOT %pass%== password 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


echo Invalid password

goto end


md Private

echo Private created successfully

goto End


Copyright bumcheekcity.com © 2007-2019.
I am not responsible for any damage you cause to your computer, hardware, hands, other body parts or family members. By accessing this website you acknowledge that I own your soul, especially Starchimedes.