Try And Error

Sunday, February 22, 2009

Lock or Hidden Folder With Batch File

Lock Folder on Flashdisk with password... Maybe other application or software like Lock Folder... But it must to be Installed... But this just use a script batch file...
To hidden or lock your folder or your files... :D
Copy this script then paste in text editor.. save as *.bat :


===============================================================
cls
@ECHO OFF
title Folder Comics
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Comics goto MDCreate
: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 Comics "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 goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Comics
echo Folder Unlocked Successfully
goto End
:FAIL
echo Invalid password
goto end
:MDCreate
md Comics
echo Comics created Successfully
goto End
:End
================================================================

Keterangan :


Comics -> Nama Folder
Password -> Password (bisa di ganti)

(c)My Friend

0 comments: