Third-party software is available if you wish to secure any files in your computer (by adding locks and password protection) and render these private. There are also some methods wherein additional software is unnecessary, locking certain files may be achieved by executing a few, relatively simple tweaks.
Here are a couple of ways to lock folders by coding, without resorting to any software:
Now enter the code below into notepad, and put in your password that you want to use for the Folder Locker were it says YOUR PASSWORD HERE.
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 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.
pause
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%==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
pause
goto end
:MDLOCKER
md Locker
echo Locker created successfully
pause
goto End
:End
Now you need to save the document as File Locker.bat You must make sure that you have .bat at the end. This will save it as a batch file. Save it to the location were you want the Folder Locker to be.
Now just go to were you saved the Folder Locker and open it. It should make a folder called locker. To lock the Folder you need to open the batch file. It should ask you if you want to lock the folder, all you have to do is type Y for yes and N for no. and the folder should disapere. To unlock the folder just open the batch file again and enter your password.
No comments:
Post a Comment