Saturday, September 3, 2011

Lock folders without any software (Only a batch file will do it)

http://www.northerntool.com/images/product/images/17856_lg.jpg?01AD=3PPwvMkmIrD61FRx__t7YFaVRDFIxNXOyZ-xJnwMIjh8tFnAn4qUDkg&01RI=B0DE11025723FA8&01NA=There are so many types of software are present in market to lock and hide folders. But they are not free, some may contain malware and so many problems.
Get out of these problems.
Why don't you make your very own soft. to do so?

Step 1: Just open a notepad and copy/paste the code below,


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.
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%==
type 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
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End

Step 2: Change the password by replacing ‘type your password here‘ in the code with your password.

Step 3: Save it as Name.bat
Do one clever thing make it such name so other may think it is a system file so they wont touch it. such as may be "xyz.bat"


Step 4: Close the file if it is still opened and double click XYZ.bat . It will create a new folder called ‘Locker’ automatically. This new locker folder will be created in the same hierarchy as the .bat file.

Step 5: Place the contents inside and double click XYZ.bat, it will ask whether you want to lock. Say ‘Y’ and now your folder will disappear

Step 6: To view again, double click XYZ.bat again and enter your password.












Now help yourself and if you have any question regarding this feel free to ask.

2 comments:

  1. For GOD sake change your site theme, please or use some good color combination. It's hard too read.

    For your post here, if someone right click on the batch file and edit,then what? So the final polished thing would be complie the batch program to exe and then use.

    ReplyDelete
  2. I have changed the theme... Thanks for your kind response.

    Actually if a person is that much cleaver of changing the file, you can be a much cleaver too.
    why compile, just keep an extra copy in some other drive(i.e. C:/windows), if the file is broken just use replace the file with the copy.

    Also you can compile the file into *.exe (Thogh i don't know how yet) and use it. But remember, if someone finds an *.exe he might like to run it.

    ReplyDelete