How to Lock a folder without any software.

Have you ever wanted to hide or lock your folders on your Windows laptop? If your answer is yes, then I am going to show you a simple way to lock a folder or your confidential files without any software.

Yes, you necessarily do not need any third party software to work out this simple task for you.

All what you need is a batch file you can create using Notepad. Notepad is a pre-installed software found on every Windows Laptop or Computer.

Batch files allows you to hide any file or folder you want and it is mostly small in size.

Below is the simple steps in how to Lock a folder without any​ software. This steps work on all windows operating system versions; Windows 7, 8 and 10.

  1. Open notepad on your Windows Laptop or Computer. Right click on the menu tab and then select New > Text Document.
  2. Copy and paste the given code into your Notepad :  cls
    title Folder Confidential
    if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
    if NOT EXIST Confidential goto MDLOCKER
    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
    ren Confidential “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
    attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
    echo Folder locked
    goto End
    echo Enter the Password to unlock folder
    set/p “pass=>”
    if NOT %pass%== ghanatalks 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
    echo Invalid password
    goto end
    md confidential
    echo Confidential created successfully
    goto End
    :End      You can opt to change your password where I typed ‘ghanatalks’ with your own password.
  3. After doing the above step, save the file as Lockedfolder.bat
  4. Whenever you will run the Lockedfolder.bat file, a new folder named “Private” will be created at the same location.
  5. Here you need to place your files in the Private folder. Then double clock on the Lockedfolder.bat file and it will ask you ‘Do You Want To Lock (Y/N)” Here Press ‘Y’.
  6. This will hide the “Private” folder from your computer. Now if you want to unhide the folder, then double click on “Lockedfolder.bat” and it will ask you the password. Enter the password you have set to unhide the Private folder.
  7. This is how you can create a password protected folder on your windows computer without any software. Your content will be safe and password protected.

Feel free to share this post and comment if you liked it. Remember my mail is always open. Also do not forget to subscribe to this blog to receive more exciting updates. Thanks for reading!


Please enter your comment!
Please enter your name here