Navigation Bar

Monday, May 25, 2009

Hide/Lock Folder using Notepad

1. Run -> Notepad

2. Copy and paste the following Code and save the filename as "FolderLock.bat"

cls
@ECHO OFF
title Folder MyFolder

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST MyFolder goto MAKESURE

:CONFIRM
echo Enter Password to Lock folder?
set/p "cho=>"
if %cho%==dhans goto LOCK
if %cho%==dhans goto END
echo Invalid choice.goto CONFIRM

:LOCK
ren MyFolder "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%==dhans goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder
echo Folder Unlocked successfully
goto End

:FAIL
echo Invalid password
goto end

:MAKESURE
echo Enter Password to create Folder?
set/p "pas=>"
if NOT %pas%==dhans goto MDFAIL

:MDLOCKER
md MyFolder
echo MyFolder created successfully
goto End

:MDFAIL
echo Invalid password
goto end

:End

3. Double Click the FolderLoct.bat. Then a folder created automatically named "Locker"

4. Add file to this "Locker" folder.

5. Double Click the FolderLoct.bat to lock/unlock the "Locker" Folder.
Before lock/unlock a confirmation message will appear in command prompt like

"Are you sure u want to Lock the folder(Y/N)"
Press "Y" to lock/unlock the folder

No comments:

Post a Comment