Help - Search - Members - Calendar
Full Version: Lock A Folder In Xp
Darkside_RG > Technical Discussions > Guides/How To > General
Codezero
Lets say you want to lock a folder DARKSIDE_RG on your C: drive or any other

eg: C:\DARKSIDE_RG

Do this:

In the same drive create a text file and type
QUOTE
ren DARKSIDE_RG DARKSIDE_RG.{21EC2020-3AEA-1069-A2DD-08002B30309D}

After which you save this text file as lock.bat

Now
Create another text file and type

QUOTE
ren DARKSIDE_RG.{21EC2020-3AEA-1069-A2DD-08002B30309D} DARKSIDE_RG

After which you save this text file as key.bat

Finaly you will see 2 .bat or batch files called lock.bat and key.bat
So by pressing lock.bat folder folder called DARKSIDE_RG will change to control panel and you wont be able to view its original contents. Press key and you will get back your original folder.

I am making an application that will do this for you automatically if you want Ill upload it.

Hope this helps
xSonarx
- Waits for the upload -

TSKILL
hi, if i were to use this, and want to lock a folder from drive C: but its located in an different directory, how should it be coded?

for example if i wanted to lock my music folder, how should it be coded, where should the .bat file be located?(does it suppose to be in same location as the locked folder?), its located at
CODE
C:\Documents and Settings\name\My Documents\My Music\Music


Is the code like:
CODE
ren Music Music.{21EC2020-3AEA-1069-A2DD-08002B30309D}
ren Music.{21EC2020-3AEA-1069-A2DD-08002B30309D} Music


and do i put the .bat file at:
CODE
C:\Documents and Settings\name\My Documents\My Music\


btw great work
Codezero
QUOTE (TSKILL @ May 10 2008, 04:58 PM) *
hi, if i were to use this, and want to lock a folder from drive C: but its located in an different directory, how should it be coded?

for example if i wanted to lock my music folder, how should it be coded, where should the .bat file be located?(does it suppose to be in same location as the locked folder?), its located at
CODE
C:\Documents and Settings\name\My Documents\My Music\Music


Is the code like:
CODE
ren Music Music.{21EC2020-3AEA-1069-A2DD-08002B30309D}
ren Music.{21EC2020-3AEA-1069-A2DD-08002B30309D} Music


and do i put the .bat file at:
CODE
C:\Documents and Settings\name\My Documents\My Music\


btw great work



If I tell you the answer then you will not going to learn how this works however I will give you easier script:

QUOTE
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 Do 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 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 Please Enter your password to Unlock folder
set/p "pass=>"
if NOT %pass%==type your 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


You can call this script what ever you want but make sure it ends with the file extension .bat like lock.bat.

What this scrip does is the same as above in one goal.
1. Don't do anything except copy and paste the script into a text file an call it whataeveryouwant.bat
2. Double click on it and it will create a folder called Locker
3. Copy your files or folders in it
4. Double click on the script again and it changes it self to Control Panel icon
5. Double click on the control panel icon and your Control Panel will open and your files will be unaccessible
6. To unlock the folder just run the script again it will ask you for a password but you can type in anything because this is boggy I taught it looked cool
7. Thats it enjoy

If you want to add password to the file just go to this tentry:
QUOTE
if NOT %pass%==type your password here goto FAIL


and change this highlighted text to what ever you want but make sure there is no spaces
QUOTE
if NOT %pass%==type your password here goto FAIL



Hope this helps
Braggy
Very good guide and I want to see this upload ;) I am very curious :) Good luck!
TSKILL
QUOTE (Codezero @ May 10 2008, 12:46 PM) *
If I tell you the answer then you will not going to learn how this works however I will give you easier script:



You can call this script what ever you want but make sure it ends with the file extension .bat like lock.bat.

What this scrip does is the same as above in one goal.
1. Don't do anything except copy and paste the script into a text file an call it whataeveryouwant.bat
2. Double click on it and it will create a folder called Locker
3. Copy your files or folders in it
4. Double click on the script again and it changes it self to Control Panel icon
5. Double click on the control panel icon and your Control Panel will open and your files will be unaccessible
6. To unlock the folder just run the script again it will ask you for a password but you can type in anything because this is boggy I taught it looked cool
7. Thats it enjoy

If you want to add password to the file just go to this tentry:


and change this highlighted text to what ever you want but make sure there is no spaces



Hope this helps



Thanks, it works perfectly. Again great job.
karafantus

Nicely done,,, but tell me is it undeletable after all ?!
just wondering
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.