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