Jump to content
xisto Community
SpaceMaster

How To Lock A Folder :) [Noob Friendly!]

Recommended Posts

Well maybe some of you know how to do this, but this tutorial is for those who don't :) But I think most people don't know. It's kind of a trick, using batch files (files that are with .bat extension). So lets get start... Working on every Windows OS

 

1st step:

Open Notepad: Start > All Programs > Accessories > Notepad

 

2nd step:

Paste this code in the New Text Document

 

cls@ECHO OFFtitle Folder lockerif EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCKif NOT EXIST locker goto MDlocker:CONFIRMecho Are you sure that you want to lock the folder? (Y/N)set/p "cho=>"if %cho%==Y goto LOCKif %cho%==y goto LOCKif %cho%==n goto ENDif %cho%==N goto ENDecho Wrong Choice!goto CONFIRM:LOCKren locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"echo The folder is locked!goto End:UNLOCKecho Type the password to lock out the folderset/p "pass=>"if %pass%== [color=#ff0000]pass[/color] goto SUCCESSFUL:FAILecho Wrong Password!goto end:SUCCESSFULattrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" lockerecho Folder is locked out successfullygoto End:MDlockermd lockerecho locker is successfully createdgoto End:End

3rd step:

Modify 23rd line by your own choice || if %pass%== pass goto SUCCESSFUL || << replace pass with the password that you want and don't forget you will need to type it later to unlock the folder

 

4th step:

Save the new text document file as locker.bat

 

5th step:

Make folder called locker or just run the file you saved locker.bat (it will create folder called locker by itself)

The folder is not visible now and its locked :) To unlock just run locker.bat again. You will be asked for password to unlock the folder.

 

NOTE: THE FOLDER LOCKER AND THE FILE LOCKER.BAT MUST BE IN THE SAME LOCATION. THAT'S HOW THE CODE IT'S WRITTEN.

 

Shown through pictures >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 

post-129490-0-70270300-1342522715_thumb.jpg

 

post-129490-0-95734300-1342522724_thumb.jpg

 

post-129490-0-08247600-1342522735_thumb.jpg

 

post-129490-0-62534400-1342522745_thumb.jpg

 

Hope you enjoyed :)

Share this post


Link to post
Share on other sites

I have Windows 7 Ultimate 64bit installed on system and this script is not working for me. When I tried to run batch file first it create a folder named locker, then when I run the script again changed the name of folder and its attribute but still folder is accessible without password. So, Please can you help me resolve this problem.And when I tried the script to unlock the folder using default password (i.e pass) folder still hidden and its name not changed to original one.

Edited by agyat (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.