Hacker News new | ask | show | jobs
by halfsquatch 1986 days ago
I use Windows. I support Windows at work. I don't code. But I need to pick up one day where I left off the previous day like anybody else. My solution works on Windows, but should be easily portable to any other platform.

I have a batch file called remember.bat, stored in my %PATH% so I can call it from anywhere (I usually use the start menu run box). It simply ECHOes the time, date, and any command line arguments to a text file. Like this:

(First post. Sorry if the formatting breaks.) (edit: yeah, formatting broke.)

time /t >> %userprofile%\documents\notes.txt

date /t >> %userprofile%\documents\notes.txt

echo %* >> %userprofile%\documents\notes.txt

echo. >> %userprofile%\documents\notes.txt

exit

I also have a log viewer application called CMTrace.exe (from Windows SCCM) in my startup folder, pointing at that notes.txt file.

So when I log in to my computer, CMTrace tails the notes file, highlighting a bunch of key words in different colors to make severity more obvious.

When I need to add something to the list, I just start\run, type "remember whatever I need to remember" (without quotes) and the file is appended with:

06:47 AM Thu 01/14/2021 whatever I need to remember

If you want to view it live, you can use anything that can tail a file instead of CMTrace if you don't have access to it. Otherwise it's available to refer to anytime with your text viewer of choice.

If I need to remove something from the notes, I can open it in Notepad++ or whatever and save it, but I find myself leaving everything there for future reference.

I realize the post starts with "When coding", but I imagine this could work there, and I know it works elsewhere, so I figured I'd share anyway.