Pinterest Stumbleupon Whatsapp
Ads by Google

We can all agree that the Windows Notepad is basic and usually gets shunted out in favor of feature-filled alternatives Notepad Not Doing The Trick? Try Out The Lightweight Alternatives Xint & Subpad Notepad Not Doing The Trick? Try Out The Lightweight Alternatives Xint & Subpad Read More . But Notepad is more powerful than it looks and we’ll introduce you to some of its hidden tricks. Soon, you’ll want to keep this ancient Windows program handy at all times by turning Notepad into a sticky note Make Your Own Sticky Notes with Notepad (Windows) Make Your Own Sticky Notes with Notepad (Windows) Read More .

Note: These tricks have been around from the time of Windows 7. I have tested all of them on Windows 10 as well. They still work!

1. Use Notepad as a Journal

Did you know that you can program Notepad to add a timestamp? This makes it perfect for adding journal entries when you have a few minutes to spare during the day.

To get an automatic timestamp, create a new text document, type in .LOG, and save the file. The next time you open the file, you should see the current date and time appear within it. Hit Enter, start recording your thoughts, and save them. As expected, every time you open the file, a fresh timestamp appears.

notepad-journal

If you want to add a quick timestamp on the fly, you could take a shortcut and hit F5 instead. This corresponds to the Time/Date item hidden in the Edit menu.

Ads by Google

2. Get Line Count

You’d like to view the number of lines in a Notepad document and you know that you’ll have to display the status bar for that. But a quick peek at the View menu shows you that the Status Bar option is grayed out, if you’re not on Windows 10 that is. What do you do now? It’s simple — head to the Format menu and turn off Word Wrap. Now you should be able to display the status bar from the View menu, and once you do, you can see the line count as well.

To jump to a specific line, hit CTRL + G to bring up the Go To Line dialog, type in the line number you’d like to jump to, and hit Enter. This works even if you haven’t displayed the line count, because Notepad’s numbering system is active at all times.

notepad-line-count

If you’d like to keep the status bar active all the time, i.e. with or without the Word Wrap option disabled, you’ll need to delve into the Windows registry and edit a specific key value. At this point we should warn you that if you tweak the wrong registry setting, it could mess up your Windows installation. To know what you’re getting into, read our guide on how to use the Windows registry What Is The Windows Registry Editor & How Do I Use It? [MakeUseOf Explains] What Is The Windows Registry Editor & How Do I Use It? [MakeUseOf Explains] The Windows registry can be scary at first glance. It’s a place where power users can change a wide variety of settings that aren’t exposed elsewhere. If you’re searching for how to change something in... Read More and how not to accidentally mess up the registry How Not to Accidentally Mess Up the Windows Registry How Not to Accidentally Mess Up the Windows Registry Working with the Windows registry? Take note of these tips, and you'll be much less likely to do lasting damage to your PC. Read More .

Ready to proceed? Great! Enter regedit into Windows search and hit Enter to open the Registry Editor. Next, look for the following key using the sidebar navigation: HKEY_CURRENT_USER\Software\Microsoft\Notepad. Once you have it selected in the sidebar, double-click on StatusBar in the right-side panel. Done? Now in the dialog box that has popped up, change the DWORD value from 0 to 1.

persistent-status-bar

3. Add a Header and a Footer

If you want to insert a header and/or a footer into a Notepad document, go to File > Page Setup…. In the dialog box that opens up, look for the Header: and Footer: fields and type in the content that you want to display in the header and footer.

notepad-header-footer

Can’t see the header and footer in the document itself? Don’t worry — that’s how it’s meant to be. Those elements will show up when you print the file.

Since there’s no way to save the header/footer content from the Page Setup dialog, you’ll have to add it manually every time you print the file. Also, you can’t set up different headers and footers in Notepad like you can in Microsoft Word and other word processors.

What’s cool about this Notepad feature is that using a few special commands, you can insert the filename, a timestamp, and page numbers in the header/footer and even align its contents left, right, or center. Here’s a snapshot of the commands you get to use:

header-footer-commands

For example, if you want to display the current date (&d) and time (&t) on the left (&l) and the file name (&f) on the right (&r) in the header, this is the text that you’ll need to paste into the Header: field: &l&d&t&r&f

4. Find the Windows Product Key

The easiest way to retrieve your Windows product key is by looking it up on the printed sticker that you’ll find on some part of your laptop or desktop, usually on the base or at the back. If that sticker is worn out or inaccessible, that’s not a problem. You can still retrieve the key from the Windows registry, as long as you haven’t formatted the hard drive, of course.

To view the product key on your computer screen, you can use a third-party program like Belarc Advisor or even a Visual Basic (VB) script that retrieves the key from the registry. We’ll show you how to create such a script. First, open up a fresh Notepad document and paste in the following bit of code:

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))

Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function

Now save the file using the extension .vbs (instead of .txt). And that’s the VB script that will give you the product key when you run it! To run the script, double-click on the .vbs file that you just created and saved. You’ll then see a popup window with your product key. Hit CTRL + C if you’d like to copy the key.

windows-product-key

5. Test Your Antivirus Software

Want to find out if your computer’s antivirus program is working okay? You can use what is known as the EICAR test file to do the checking for you. Don’t worry, that’s not a virus-laden file we’re unleashing on your computer. It’s a simple text file that you’ll be creating in Notepad, with the following piece of harmless code saved to it:

X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

Your virus scanner should pick this file up as a virus and deal with it accordingly. If it does, it’s a sign that the antivirus program is working as expected. Of course, this does not guarantee that you’re protected from all viruses.

eicar-test

6. Create a Password-protected Folder

With this trick, the idea is to create a deceptive file that you can use to unlock and reveal a secret folder as and when you need it.

To begin with, create a new Notepad document and paste this code into it:

cls
@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%== your_password 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

Replace your_password in the code above with a password of your choice and save the file as a Batch file named locker.bat. I’ll digress a bit here to point out that you can automate various repetitive tasks with Batch files How to Use Windows Batch File Commands to Automate Repetitive Tasks How to Use Windows Batch File Commands to Automate Repetitive Tasks Do you frequently execute boring and repetitive tasks? A batch file might be exactly what you’re looking for. Use it to automate actions. We'll show you the commands you need to know. Read More .

When you run the locker.bat file (by double-clicking on it) for the first time, it creates a folder named Private in the same location as the .bat file. This folder is where you can stash away any files and folders that you’d like to keep to yourself.

Now run the locker.bat file again. This asks you whether you want to lock the file. Hit Y, followed by Enter to confirm. You’ll see that the Private folder is no longer visible.

folder-locker

To access the folder again, run locker.bat and when prompted, enter your password (the one you added to the code while saving the .bat file). If you have forgotten the password, drag and drop the locker.bat file into Notepad to view the password.

This trick is fun, but it’s not foolproof — anyone who knows where to look and what to tweak can find the secret folder with ease. To display the secret folder yourself without running locker.bat, go to Folder Options > View and…

  • …uncheck the box next to Hide protected operating system files,
  • check the radio button for Show hidden files, folders, and drives.

The folder might show up with the name Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D} instead of Private.

7. Remove Formatting from Text Snippets

Copy-pasting text snippets from one app to another comes with the problem of messed-up formatting. It’s better to paste in unformatted text and then format it using styles from the app that you’re pasting into.

To do so, you’ll first need to strip the formatting from the copied text. The quickest way to do that? Use CTRL + SHIFT + V to paste unformatted text directly or, you could first paste the text into Notepad, which supports only plain text, and copy-paste it from there.

Of course, that’s just one way to strip formatting when you copy-paste text 5 Ways to Strip the Formatting When You Copy & Paste Text 5 Ways to Strip the Formatting When You Copy & Paste Text Carrying all the rich text formatting along when copying and pasting text is irritating. Here are multiple ways to avoid that. Read More .

8. Make Your Computer Speak

You can get your computer to read a piece of text to you with a simple VB script that we’ll create using Notepad. Begin with a new document and paste in the code given below:

Dim message, sapi
message=InputBox("Repeat after me")
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak message

Use the File > Save As command to save the file with the extension .vbs. Now when you open the saved file, you’ll get a dialog box with a blank text field. Type in something for your computer to read aloud and hit OK. You’ll also want to take a look at these five other ways to get your Windows computer to read to you 5 Ways to Make Your Windows Computer Speak to You 5 Ways to Make Your Windows Computer Speak to You Lean back and listen: let your PC do the reading. Windows comes, built in, with the ability to read text and third-party apps offer additional features. Let us show you the details. Read More .

In the code above, you can replace the text Repeat after me with a message of your choice and that is what you’ll see as a prompt in the dialog box when you run the script.

text-to-speech

Notepad Magic

Who knew Notepad was capable of all these tricks? It has stayed more or less the same over the years, but it has turned out to be cooler than we thought.

Do you have a Notepad trick or two up your sleeve? Share it with us!

Image Credits: Renars 2013/Shutterstock

  1. Paranam Kid
    November 20, 2016 at 1:34 pm

    Windows Product Key: your script works, it extracts a key, but I do not think it is the WPK.
    The reason I say this is because I have used 2 different apps, Freepcaudit & Nirsoft's ProduKey, both of which extracted the same key, but that key is completely different from the one extracted with your script.
    So, can you check that your script extracts the right key & let us know here?

    • Akshata Shanbhag
      November 22, 2016 at 3:10 am

      I used the same script and it extracted the right key for me. I'm not sure why it's extracting a different one for you.

  2. John Smith
    September 3, 2016 at 9:52 am

    So putting code in notepad, something you can do in every text editor, is now a notepad trick?
    That's not accurate, to say the least.

  3. Peter Buyze
    August 24, 2016 at 5:38 pm

    Thanks Akshata, good article. The password protected folder is a bit of a joke. The product key file is useful & works well :-) Do you have a similar code for MS Office?

    • Peter Buyze
      August 25, 2016 at 7:25 am

      2016-08-25 follow-up: the anti-virus test file works in that my AV app picked it up within seconds of my saving the file. I assume it is a pretty simple file & not representative of the threats going around today, seeing the page you link to is 10 years old.

      • Akshata Shanbhag
        August 31, 2016 at 3:28 pm

        Thank you, Peter. Yeah, the password-protected folder is more interesting than useful :) Same with the antivirus test.

        I don't have a product key solution for MS Office right now, but I will report back if I find one.

  4. Shauna Johnstone
    August 24, 2016 at 11:38 am

    I get a script error line 7 char 9 on your vbs file to determine the product code. Can you debug that?

    • Akshata Shanbhag
      August 24, 2016 at 1:00 pm

      Hi Shauna,

      A few odd characters seem to have slipped into the code. You'll need to retype:

      1. the quotes in - “BCDFGHJKMPQRTVWXY2346789” and KeyOutput = “-” (smart quotes have appeared instead of straight quotes)

      2. the minus sign in If (((29 – i)

      Please let me know if this doesn't fix the problem.

      I'll get the the changes made to the code in the article as well, so you can copy-paste it again later if you want to.

    • Tina Sieber
      August 24, 2016 at 4:34 pm

      Thank you for the catch, Shauna! The code above should now work if you copy-and-paste.

      In that example, the code tag was closed prematurely and our theme messed up the characters Akshata pointed out (quotes and minus sign) in the rest of the code.

  5. tracirandall1977
    August 24, 2016 at 9:54 am

    Thanks for the information...

  6. Read and Share
    August 24, 2016 at 6:25 am

    Moi, I don't see anything deceptive at all about this article.

    While Notepad and also Wordpad can fit my simple word processing needs, I need the convenience of built-in encryption for some of my documents. Since it makes little sense to use different apps for public/private documents, I pretty much have to use the full-featured Word. Oh well...

    • Peter Buyze
      August 24, 2016 at 5:35 pm

      You can use VeraCrypt to set up an encrypted volume for all your confidential files. VC is easy to set up & works well.

  7. Keith Collyer
    August 23, 2016 at 10:54 pm

    Using code goes far beyond that. Tips 4-8 have NOTHING to do with Notepad. You might as well provide all the source code for a paint application then claim you can use notepad to draw pictures. Your headline is at best misleading and at worst deliberately deceptive. OK, no crime has been committed, but it diminishes the respect for MUO for it to use such a dishonest clickbait title

    • trm96
      August 24, 2016 at 7:14 pm

      That's the same thing I was thinking

    • Brill I Aint
      August 30, 2016 at 3:06 pm

      wow. if this is click bait, you need a new hobby

  8. Keith Collyer
    August 23, 2016 at 5:18 pm

    OK, so 1, 2 and 3 are notepad specific, but the rest can be done in any text editor, even Word. Three not as magic a number as 8, perhaps?

    • Akshata Shanbhag
      August 23, 2016 at 7:20 pm

      Keith, the idea here is to show that the default notepad on Windows is not as basic as it looks on the surface :)

    • Watcher
      November 16, 2016 at 11:03 pm

      Calm down, dude! Who pissed in your Cheerios this morning!?

Leave a Reply

Your email address will not be published. Required fields are marked *