PDA

View Full Version : Windows XP: Make a folder Password Protcted without a software


Hitterman
05-10-08, 12:55 PM
♦ Paste the code below in notepad.
♦ Save it as batch file(with extension .bat). You can use any name. Ex(name.bat).
♦ Now you see a batch file. Double click it to create a folder locker.
♦ A new folder named Locker would be formed at the same location.
♦ Now brings all the files you want to hide in the locker folder.
♦ Now double click the batch file to lock the folder namely Locker.
♦ If you want to unlock your files,double click the batch file again and you would be prompted for password.Enter the password and enjoy access to the folder.

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 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

Source: md5this

$Hero$
06-10-08, 08:24 PM
thanks for it. Worked!

Bharath
06-10-08, 08:30 PM
not able to lock it...................!!!!!!!!:confused:

cokacola
07-10-08, 08:16 PM
I know, I opened console and dropped it it
created locker folder, done it again and it said
"unexpected goto:" So I will look again later...see if I can see anything!

$Hero$
07-10-08, 08:52 PM
Which are you using XP SP3?

sachinrulez
07-10-08, 09:01 PM
the concept is good but i cant lock the folder....i'm using Xp sp2 and bharath is using Vista

Hitterman
07-10-08, 11:14 PM
Weird thing is working perfectly fine for me. :confused:

sachinrulez
08-10-08, 09:17 AM
actually when i press 'Y' in command prompt,the command prompt exits and nothing happens after that....

cokacola
08-10-08, 10:09 AM
it exists for me, but if your quick, you realize it say "unexpected goto:" for some reason, BTW, I am on XP SP2 - used to be SP3, but some of my software didnt like that very much :/

Hitterman
08-10-08, 02:47 PM
I don't know. Can you see a newly created folder named "Locker" on your screen?

sachinrulez
08-10-08, 04:43 PM
yeah im can see that.

cokacola
08-10-08, 06:14 PM
i can too, but it wont lock ^.^

Hitterman
08-10-08, 06:47 PM
I think i should check the code again. There may be some errors.

cokacola
09-10-08, 05:44 PM
maybe..if you get it to work, I'd love to use it.... :P

shalin_hitter
10-10-08, 03:28 PM
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 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

Now check this code.It works fine for me

cokacola
10-10-08, 06:19 PM
yay! it works, thanks!

Hitterman
10-10-08, 06:31 PM
Reputation added to you Shalin

Lightbulb
30-10-08, 07:55 AM
It worked! This is useful.

abhay_srinivas
31-10-08, 08:35 AM
thanks it works perfectly

Motorokr
07-11-08, 08:15 PM
What you changed in the code?

shalin_hitter
07-11-08, 09:58 PM
i dont know what i changed.i have just copied the code i have.