How to Set Password in Notepad: A Simple Guide

By Admin
April 22, 2024
4 min read

How to Set Password in Notepad: A Simple Guide

Notepad is a basic text editor that comes with Windows operating system. While it doesn't natively support password protection, you can still add a layer of security by encrypting the text within a Notepad file.

Step-by-Step Guide to Set Password in Notepad:

  1. Open Notepad on your computer.
  2. Type or paste the text that you want to protect.
  3. Go to 'File' and select 'Save As'.
  4. Choose a location to save the file.
  5. Before saving, change the 'Save as type' to 'All Files'.
  6. Set the file name with a .bat extension (e.g., securefile.bat).
  7. Click on 'Save'.
  8. Now, open File Explorer, locate the saved .bat file, and right-click on it.
  9. Select 'Edit' to open the file in Notepad.
  10. Copy and paste the following code in the file:
    @ECHO OFF
    title Folder Private
    if EXIST 'Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}' goto UNLOCK
    if NOT EXIST Private 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 Private '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%== YourPassword goto FAIL
    attrib -h -s 'Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}'
    ren 'Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}' Private
    echo Folder Unlocked successfully
    goto End
    :FAIL
    echo Invalid password
    goto end
    :MDLOCKER
    md Private
    echo Private created successfully
    goto End
    :End
  11. Replace 'YourPassword' in the code with the password you want to set.
  12. Save the file and close Notepad.
  13. Now, double-click on the .bat file to create a new folder named 'Private' where your text is securely stored.

By following these steps, you can add a password protection layer to your text files using Notepad.

Additional Links


How To Put A Password On A Notepad File
How To Password Protect A Notepad File
How To Make A Password Hacker In Notepad
How To Add Password To Text File
How To Set Password
How To Password Protect File In Windows
How To Put Password On Windows Folder
How To Protect Folder In Windows With Password

How To Reset Computer Password Without Usb Flash Drive

What is the password problem?

The password problem refers to the challenges and vulnerabilities associated with creating, managing, and securing passwords, which often leads to weak or reused passwords and increased security risks.

By Admin
8 min read

Generate strong passwords tool

Online web, mobile resources for generating strong passwords...

By Admin
10 min read

Did you find this page useful?