Sunday 9 June 2013

Make Folder Lock using BAT FIle


1.Copy and paste the code in notepad


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 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 Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== pass 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


Save it then a locker.bat


2.For the first time if you click on the bat file,it will create a folder named locker


You can paste your secret file in locker then again click on the batch file




3.It will ask for confirmation 




4.Then after confirming it will lock the folder


See locker folder does not exist now


5.For unlocking you have again to click on the bat file,it will ask for a password,which is set as "pass",give the password and press enter.You can change the password in code.



Folder will be unlocked now...



Done...

Thank You for visiting...if you like the post click on +1 or like...
Join as member for more tricks...

Copy All files to a Specific Folder Batch Program

1.Open Notepad and paste the code 


@ECHO OFF
::variables
echo enter the source folder name
set/p "src=>"
echo enter the detination folder name
set/p "des=>"
set backupdir=%USERPROFILE%\Desktop\%des%
set backupcmd=%xcopy /s /c /d /e /h /i /r /y
if NOT EXIST %src% goto FAIL
%backupcmd% "%USERPROFILE%\Desktop\%src%" "%backupdir%"
echo copy succcessful...
pause
exit
:FAIL
echo source folder does not exsist
pause 1
goto end
:END
exit





Now save it as copy.bat

2.Double click on it.
3.If the source folder exsist then it will show the window



4.If the source folder does not exsist then it will show




Done...

Thank You for visiting...if you like the post click on +1 or like...
Join as member for more tricks...