You thought you knew everything about cmd.exe!
Last month, Michael Kaplan explained that after all this time, he thought he knew everything there was to know about the MessageBox Win32 API yet managed to find something new to him (and to me as well BTW ;-).
And after all this time, I thought I knew everything one might want to know about the good old command prompt, cmd.exe:
Of course I know that Windows XP's command prompt accepts document names in addition to exe command names. e.g.: you can type services.msc to open the Services applet. Or you can simply type the name of a Word document to open it.
(I say XP's command prompt because IIRC it wasn't the case in previous versions).
I knew about how to enable auto-complete of filenames in Windows 2000 before it became a default setting in XP.
OK, for sure I'm no expert in batch files but at least I know my limits in the area.
A (not so) hidden command history list
But last week, I discovered that I'm not as knowledgeable as I thought. Will you believe the unbearable? Yes, a cmd.exe feature I had never seen before. I was switching between Visual Studio and a couple of command prompts. At some moment, I hit F7 to recompile while the focus was still in one of the command prompts.
Ho! F7 triggers a pop-up window with the command history. Boy, I just can't believe how I have been able to never see that before! The funny thing is that I talked to a couple other developers about it and none of them knew about F7 either.
Auto-complete recent commands
OK, let's try the other function keys to see if there's another handy goodie hiding in there. F8 is the only other interesting one I found: type the start of a command, then F8 repeatedly: it will auto-complete your command with the ones in your command history.
Console window title

While on the subject of less known features, the title command is another interesting one: it sets the title of the console window. This is particularly interesting when you keep several command prompts opened simultaneously : You can immediately identify each one in the task bar instead of having to go through each of these anonymous "c:\windows\sys..." task bar buttons.

And if you are interested in Internet Explorer keyboard shortcuts, Jeff Atwood recently posted a summary.

