Folder locking mechanism without any special software

Discussion in 'General Discussions' started by Sravanthi28, Sep 26, 2007.

  1. Sravanthi28

    Sravanthi28 Silver IL'ite

    Messages:
    235
    Likes Received:
    97
    Trophy Points:
    68
    Gender:
    Female
    Many people have been looking for an alternative way to lock folders without the use of any alternative software..
    Stpes:
    1) Open a Notepad and copy the below code and save as Locker.bat wherever you want.
    2) After saved the Locker batch file, Right click the batch file select Edit option.
    3) Change the password inside the file into your own password.
    4) i.e. Find Type your own Password here text and Replace with your own password, keep it in mind.
    5) Now double click on Locker.bat for first time to start, it will create folder named as Locker automatically for you.
    6) After creation of the Locker folder, place the contents u want to lock inside the Locker Folder.
    7) Come out the Locker folder and double click the Locker.bat again.
    8) It will ask, Are you sure u want to lock the folder(Y/N), Give Y to that. Then the folder will be vanished.
    9) When you want to unlock the folder again, double click the Locker.bat again.
    10) It will ask, Enter password to Unlock folder, Give the password which you have specifed.
    11) Now the Locker folder will be visible to you.
    12) You can continue the same logic again to lock the folder.
    Code for Batch file:

    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 own 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
     
    Loading...

  2. gauridatta

    gauridatta New IL'ite

    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Gender:
    Female
    Excellent post, amazing i was looking for such system
    Thanx a lot for solving my prob.
    Luv
    gauri
     
  3. Abha

    Abha Bronze IL'ite

    Messages:
    509
    Likes Received:
    19
    Trophy Points:
    48
    Gender:
    Female
    Its Just great

    i've been looking for this sort of thing from a long long time
    thanks a lot for posting this

    ~Abha
     
  4. eswarireddy

    eswarireddy New IL'ite

    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Female
    Hatsoff to you for this code. Excellent Sravanthi.
     
  5. Tweety

    Tweety Bronze IL'ite

    Messages:
    63
    Likes Received:
    10
    Trophy Points:
    30
    Gender:
    Female
    Wonderful!!. I've been looking for such a thing for a long time.
    Thank you so much sravanthi
    Tweety
     
  6. kutekrish

    kutekrish Senior IL'ite

    Messages:
    65
    Likes Received:
    23
    Trophy Points:
    23
    Gender:
    Male
    Its as good as locking a door with a hi-tech 10 digit number lock and pasting the passcode on a big banner just next to the lock. Big Laugh Anyone who has slightest knowledge can open the batch file and know you password plus take all your data.....

    It would be meaningful if you put this code to say some VB/.NET executable/dll and distribute.

     
  7. dhanaselvi

    dhanaselvi New IL'ite

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Female
    This Coding Is In What Language? Can U Tell Me
     
  8. orion80

    orion80 Platinum IL'ite

    Messages:
    2,648
    Likes Received:
    553
    Trophy Points:
    233
    Gender:
    Female
    Hi Sravanthi,

    If you right click on the Locker.bat file and use "Open with" option and select "notepad" or any other text editor, your password will be visible to you. Maybe you can modify the code to give and exe file.
     
  9. todd434

    todd434 New IL'ite

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Gender:
    Male
    Yes, I agree but there are some good free batch to exe converters out there that will do the job nicely
    Here is the same code, except I changed it a bit(, its rather long).

    : Made By Todd Davies 28.03.09
    @ECHO OFF
    title control
    if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
    if NOT EXIST Locker goto MDLOCKER
    :START
    cls
    echo what do you want to do?
    echo 1=lock/unlock
    echo 2=user control
    echo 3=run a task at a specified time
    echo 4=send a message to this computer
    echo 5=send a message to all computers on the network
    set/p "choice=>"
    if %choice%==2 goto ADD
    if %choice%==1 goto CONFIRM
    if %choice%==3 goto RUN
    if %choice%==4 goto MSG
    if %choice%==5 goto SEND
    If %choice%==egg goto EGG
    :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.
    pause
    goto CONFIRM
    :LOCK
    ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
    attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
    cls
    echo Folder locked
    pause
    goto End
    :UNLOCK
    echo Enter password to Unlock folder
    set/p "pass=>"
    if NOT %pass%== password goto FAIL
    attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
    ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
    msg * Folder unlocked successfully
    pause
    cls
    goto START
    :FAIL
    cls
    echo Invalid password
    pause
    cls
    goto UNLOCK
    :MDLOCKER
    md Locker
    goto START
    :EGG
    telnet towel.blinkenlights.nl
    pause
    goto END
    :ADD
    echo choose:
    echo 1=add an admin
    echo 2=change a users password
    set/p "choosenow=>"
    if %choosenow%==1 goto ADDUSER
    if %choosenow%==2 goto PASSWORDCHANGER
    :ADDUSER
    echo enter user name:
    set/p "name=>"
    net user %name% /add
    net localgroup administrators %name% /add
    echo There is now an administrator with the name you selected!
    pause
    cls
    goto end
    :pASSWORDCHANGER
    echo enter the username:
    set/p "username=>"
    echo enter their password:
    set/p "passwordis=>"
    net user %username% %passwordis%
    echo password changed
    pause
    cls
    goto END
    :RUN
    echo enter time (24 hrs e.g: 15:47) :
    set/p "time=>"
    echo enter app (e.g. cmd.exe):
    set/p "application=>"
    at %time% /interactive "%application%"
    echo done
    pause
    goto end
    :MSG
    echo enter your message:
    set/p "msg=>"
    msg * %msg%
    cls
    echo message sent
    pause
    goto end
    :SEND
    echo enter message:
    set/p "netmsg=>"
    net send * %netmsg%
    cls
    echo done
    pause
    :End
    echo finish y/n?
    set/p "finish=>"
    if %finish%==Y goto FINAL
    if %finish%==y goto FINAL
    if %finish%==n goto START
    if %finish%==N goto START
    :FINAL

    thanks, have fun
     

Share This Page