I used to know a trick so that every time I opened a text file in Notepad it would be populated with the current date and time and a pseudo-linebreak (i.e. =============).

I thought it was just calling the file whatever.LOG but it doesn't seem to work.

I was on Windows XP last time I knew this to work, now I'm on Windows 7. It seems like a pretty archaic feature but why would it be removed?

Any help would be appreciated! Thanks.

  • When exactly do you want the date appended to the top of the text file? When you open it or when it is first created? – iglvzx Jan 18 '12 at 22:29
  • Please see the answers below :) – Matthew Jan 18 '12 at 22:57

Type .LOG on the first line, and then press ENTER to move to the next line.

Save the file. Each time you open it, it adds the time/date stamp.

More info here: http://support.microsoft.com/default.aspx?scid=kb;en-us;260563

| improve this answer | |

The process is outlined in this Microsoft article: http://support.microsoft.com/kb/260563

The first line of your file must be .LOG and it's important that it be in upper case. I just tried it in Windows 7 and it still works.

| improve this answer | |
  • Thanks - accepted because you're two minutes ahead of Kerry – Matthew Jan 18 '12 at 22:57
  • @Matt, if that is the basis for accepting the answer, you should know that Kerry's answer is two minutes older than Mark's. – iglvzx Jan 18 '12 at 23:14
  • @iglvzx is right, but I swear that we wrote our answers independently. I took 2 minutes to test the answer. – Mark Ransom Jan 18 '12 at 23:27
  • @MarkRansom It happens. :) Stack Exchange will show a small notification when another user has posted an answer while you are writing one. I'm not sure it goes away by itself. When there's a single, set answer to a question, it is not too rare for people to post the same thing at nearly the same time. – iglvzx Jan 18 '12 at 23:30
  • 1
    It was basically a coin-toss to decide since both answers gave pretty much identical information. I made a mistake on the timing part, I've now rectified it. – Matthew Jan 19 '12 at 0:25

I remembered! All you've gotta do is start your file contents with .LOG.


22:25 18/01/2012
Something happened I should make a note of.

22:26 18/01/2012
Another thing has happened!

22:26 18/01/2012
Not again!
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.