How to create the batch file to lock a folder
1. Copy and paste the following codes in a notepad file.
cls
@ECHO OFF
title Folder Confidential
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Confidential 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 Confidential "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 the Password to unlock folder
set/p "pass=>"
if NOT %pass%== eclipse goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Confidential
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md confidential
echo Confidential created successfully
goto End
:End
2. Save the file as “Key.bat”. You are done. When you’ll double click on the Key.bat file for first time, a folder “Confidential” will be automatically created. You can move all your confidential data in that folder.Now to lock the folder just double click on the file “Key”. You will get a confirmation message in Command Prompt. Type “y” to confirm. Now the folder “Confidential” will be locked and hidden.If you want to access the contents of the folder then again double click on the batch file, you have created. Immediately you will be prompted to enter your password. After that you can access the folder “Confidential”.
By this process you can password protect the folder and no body can access the folder without the password. But still there is some risk. If some body is a computer savvy then he can easily retrieve the password from your batch file. He can easily find the password by choosing “Edit” option from the right-click context menu.
So, to prevent from that option you can make an executive file of the batch file. The facility of the executive file is that no body can’t see the source code of an exe file. Here I’ve described the process of converting the batch file to executive(.exe) file.
At first you need a compiler that compiles the batch file to an executive file.
1. Download Bat to Exe converter
2. Now run the application and put the source path of the batch file, then the target executive file name with location.
. Click on “Compile” button.
That’s all. Delete the batch file “key.bat”. You can now protect or access the folder by using the exe file (key.exe). Your data is now fully protected.
The above method works in XP, Vista and Windows 7.
While password protecting a folder ensures the security of important data, password protect images to make them private and inaccessible.
<<<<<<<<<<note:- here i have set the password to .......eclipse........ if you want to change , just search for the word eclipse in the command lines from downwards and replace ''eclipse" with the pass you want.................for more security download bat to exe conv. having password encryption so that you can set pass on your exe file......@#^$#^%#
...............................enjoy....
1. Copy and paste the following codes in a notepad file.
cls
@ECHO OFF
title Folder Confidential
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Confidential 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 Confidential "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 the Password to unlock folder
set/p "pass=>"
if NOT %pass%== eclipse goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Confidential
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md confidential
echo Confidential created successfully
goto End
:End
2. Save the file as “Key.bat”. You are done. When you’ll double click on the Key.bat file for first time, a folder “Confidential” will be automatically created. You can move all your confidential data in that folder.Now to lock the folder just double click on the file “Key”. You will get a confirmation message in Command Prompt. Type “y” to confirm. Now the folder “Confidential” will be locked and hidden.If you want to access the contents of the folder then again double click on the batch file, you have created. Immediately you will be prompted to enter your password. After that you can access the folder “Confidential”.
By this process you can password protect the folder and no body can access the folder without the password. But still there is some risk. If some body is a computer savvy then he can easily retrieve the password from your batch file. He can easily find the password by choosing “Edit” option from the right-click context menu.
So, to prevent from that option you can make an executive file of the batch file. The facility of the executive file is that no body can’t see the source code of an exe file. Here I’ve described the process of converting the batch file to executive(.exe) file.
At first you need a compiler that compiles the batch file to an executive file.
1. Download Bat to Exe converter
2. Now run the application and put the source path of the batch file, then the target executive file name with location.
. Click on “Compile” button.
That’s all. Delete the batch file “key.bat”. You can now protect or access the folder by using the exe file (key.exe). Your data is now fully protected.
The above method works in XP, Vista and Windows 7.
While password protecting a folder ensures the security of important data, password protect images to make them private and inaccessible.
<<<<<<<<<<note:- here i have set the password to .......eclipse........ if you want to change , just search for the word eclipse in the command lines from downwards and replace ''eclipse" with the pass you want.................for more security download bat to exe conv. having password encryption so that you can set pass on your exe file......@#^$#^%#
...............................enjoy....
No comments:
Post a Comment