Sponsored Ads

Monday, October 24, 2011

Lock a folder in windows without using any software


You might want to keep some of your data confidential without letting other users, using your PC, to get to know about it. Well if you'ld have tried to do so, you might have used a number of softwares to do that. But what if you don't have such a software to encrypt your data or what if you have software installation restrictions if you are not the admin of a system. Well in that case, techrythm brings to you some simple steps using which you can secure your data. Just follow these steps :-

1.Open notepad.(Windows 7 - Start-> Run-> Notepad)
                          (Windows xp - Start-> All Programs-> Accessories-> Notepad)
2. In your notepad file just paste the following text,shown between the lines and highlighted in grey color, after copying it from here.
_______________________________________________________________________________________________
cls
:End
@ECHO OFF
title Folder Lock

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 this 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 entry.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder has been locked
goto End
:UNLOCK
echo Enter the password to Unlock this folder
set/p "pass=>"
if NOT %pass%==techrythm goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder has been Unlocked
goto End
:FAIL
echo The password is incorrect
goto end
:MDLOCKER
md Locker
echo Locker has been created successfully
goto End
_______________________________________________________________________________________________

3. In the code above, find the text given below and replace the text "techrythm" in it with your password
_______________________________________________________________________________________________
 if NOT %pass%==techrythm goto FAIL
_______________________________________________________________________________________________
4. Now hit ctrl+s and save this notepad file at the desired location(the place where the folder to be locked is located) with yourdesiredname.bat . For example, techrythm.bat

5. In the save as window keep the "Save as type" as "text document(*.txt)" and Encoding as ANSI.


6. After this, a .bat file will be created, which is a system file.


7. Double click on this file .


8. A folder named "Locker" appears at the same location where your .bat(system) file has been saved.


9. Double click on this folder to open it.


10. Copy all your data into this folder.


11. Now double click on the .bat folder again. A Command prompt window opens.


12. Press Y (to lock the folder) and hit enter.


13. Now, the "Locker" folder will hide, and only .bat file remains at the location.


14. When you want to open this folder, just open the .bat file, enter your password(here techrythm) and hit enter.


This is it. You have successfully created a password protected folder. You can open this folder using .bat file infinite times and update your folder any number of times.
Enjoy!!!