Cory Peters

Adventures with SharePoint

Feb

2

Saving Your Command Line History

By Cory

Many times I find myself in a command window hacking away deploying solution packages or activating features to only later think to myself that I would love to save those commands to a batch file. Previously I would have copy and pasted the contents of the window into notepad and started removing all of the directory information but now I use this method below:

doskey /history > commands.bat

This will export the entire command window history into a file called commands.bat. You’ll just need to go into commands.bat and remove any of the unwanted commands. Enjoy!

Leave a comment