Timestamps in Notepad

Via Sanket’s MSDN Blog

Lot of times, we use the Notepad to quickly write down some points. Notepad offers a really nice feature for such users.Imagine Notepad automatically appending the timestamp every time you open it to write some info…..

Take a look at this –

1. Create a blank text file with .LOG as the first line of the file, followed by a carriage return. Save the file with any .txt extension.

2. Double-click the file to open it and notice that Notepad appends the current date and time to the end of the file and places the cursor on the line after.

3. Type your notes and then save and close the file.

Each time you open the file, Notepad repeats the process, appending the time and date to the end of the file and placing the cursor below it.

While digging on the net about this nifty little tip, I chanced upon this additional article from Microsoft’s Knowledge base:

Microsoft Notepad is a word processing tool included with Windows and is installed by default under the Accessories program group. You can use it to create a log-type file that adds the current date and time each time the Notepad file is opened. This article describes how to create a log file with Notepad.
To create a log file in Notepad:

  • Click Start, point to Programs, point to Accessories, and then click Notepad.
  • Type .LOG on the first line, and then press ENTER to move to the next line.
  • On the File menu, click Save As, type a descriptive name for your file in the File name box, and then click OK.
  • When you next open the file, note that the date and time have been appended to the end of the log, immediately preceding the place where new text can be added.
  • You can use this functionality to automatically add the current date and time to each log entry.

3 thoughts on “Timestamps in Notepad

  1. Thanks for the tip mate. At tech support you need to type up as soon as someone calls. Your apps may not be ready for this, so it all goes into the notepad. We need a date and time stamp as well. Good find.

  2. Hey Dude,
    Can you gimme the link on the MSDN where they have actually mentioned this feature?
    That would be great 🙂

    –Sanket

  3. Yeah! It was documented as long as as in 2002 😐 but never made it to the limelight….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s