My Windows Hub

How to add Timestamp in Notepad Whenever you open a file in it?

Notepad is one of the simplest yet powerful tools and it comes as pre-installed with Windows installation. It can open and edit different types of files like .txt, .log, .html, .xml, a script, a data file (.dat) etc. Different type of log files, with different extensions can also be opened by notepad. As you know it’s a very basic utility to use and not too much things to explain on how to use it, though there are handful amount of tips or tricks that you may want to know. One of those is adding timestamp in your file whenever you open or edit it using Notepad app.

Just create a new file or edit an existing file and put .LOG in the first line of the file. It does not only work with .txt extension but also with .log or any other extensions that can be opened using Notepad. Whenever you will open the file it will add timestamp to that file.

If you don’t want to add timestamp automatically every time you open a file, you can manually add the timestamp when required by just pressing the F5 button when you have the file opened.

Always make sure you save the file every time you close it, otherwise timestamp will not be written.


Nick is a Software Engineer. He has interest in gadgets and technical stuffs. If you are facing any problem with your Windows, feel free to ask him.