Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

easy way to copy to clipboard from windows command prompt

I often type long command lines in the windows command prompt. When I get a failure I want to copy that command line to the clipboard so I can use it in my debugger.

Using Edit->Mark is really inconvenient when the command line is more than one line. At easy way to do copy the command line to clipboard?

like image 481
martin71 Avatar asked Feb 25 '23 16:02

martin71


1 Answers

doskey /history | clip is a start. You could write a batch file to pull just the last line out of the history if you wanted to be a bit more accurate.

like image 140
Nicholas Riley Avatar answered Mar 05 '23 14:03

Nicholas Riley