Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Best Way To Lock A Folder Without Using An Application


55 replies to this topic

#51 Guest_Code Lover_*

  • Guests

Posted 10 December 2011 - 11:27 AM

View PostZagete, on 10 February 2008 - 12:25 AM, said:

Steps:

1- make a new folder ( name it as you like )
2- inside this folder make a (.TXT ) file & copy the following inside it:
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

3- After u copy the command go to line ( 23 ) u will find "password here" Change to any password u want.
4- After that, save it as locker.bat (the txt file will change to an application file)
5- Now go back to the folder & u will find a this locker.bat file.
6- Click on it & u will find a new folder called Private.
7- Now copy what u want in it & after that go to locker.bat by clicking it, it will open and ask you if you want to lock your folder? Y/N ?
8- Type Y
9- If you want to UNLOCK your folder, go open locker.bat & type your password and the Private folder will be made visible again.


Tested and working :]

Hide stuff from strangers, lol... Posted Image [I wonder what you're gonna hide Posted Image ]
____________________________________________________

It's a good feminine idea, but any buddy may easily access/modify locker.bat file and remove the folder where this .bat file and the Private folder do exist, huh! For example, I created a folder 'Personal' in this folder I put locker.bat file which creates and hides the folder 'Private', ok? But there's no any protection for 'Personal' folder to make it inaccessible. Suppose, my one friend requests me to borrow my USB-Flash Drive for a short while, what's the surety that he/she will not remove or copy the Folder 'Personal'? Thanks!

#52 Guest_Anil_*

  • Guests

Posted 22 December 2011 - 05:48 AM

For your code, till 8th point its working fine, once i lock it, when i try to unlock it Folder is not visible.... What could have gone wrong.?

#53 Guest_Asad_*

  • Guests

Posted 12 February 2012 - 05:20 PM

Good Job! but the password can be seen just right click on batch file and that's all :huh: .....

#54 Guest_Praveen_*

  • Guests

Posted 04 March 2012 - 04:07 AM

There is a flaw in this...
Anyone can find the password by opening that .bat file in notepad.
:(

#55 Guest_Hemant_*

  • Guests

Posted 27 March 2012 - 07:17 PM

View PostPraveen, on 04 March 2012 - 04:07 AM, said:

There is a flaw in this...
Anyone can find the password by opening that .bat file in notepad.
:(


You are right, this is not a perfect solution to lock folder.
One more thing is if you lock a folder on a usb, it's not going to work with this. As the program is accessing local registry.

#56 Guest_Jay_*

  • Guests

Posted 09 April 2012 - 08:59 AM

Hi.. I typed wrong password for few types and nothing happened. Now i know the password and opened the folder but I can not see data in the folder. If I go to properties of the main folder, I can see files size of the data, that means data is there but not seen.,. what to do now




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users