Is there a .history file on Windows machines?
Solution 1:
For plain old cmd
, no there really isn't anything like that.
Even under PowerShell, I believe the history is still limited to the lifetime of the PowerShell session, though it gives you the functionality to work with and export the history, and even load it. You can use that to create some helper scripts to load and save your history easily as demonstrated here, but nothing out-of-the-box.
Solution 2:
After looking into this some more it looks like there isn't a physical file-system file on Windows because everything is stored in memory. It looks like I can get the history using doskey.
doskey /history
I can extract a file by simply dumping that output to a file...
doskey /history > myhistoryfile.txt