Skip to content

Instantly share code, notes, and snippets.

@shanselman shanselman/blogpost

Created Sep 23, 2016
What would you like to do?
<p>It's always the little throwaway tweets that go picked up. Not the ones that we agonize over. I was doing some work at the command line and typed "dotnet --version | clip" to copy the .NET Core version number into the clipboard. Then I tweeted a little "hey, remember this great utility?" and then the plane took off. I landed two hours later and it had over 500 RTs. Madness. </p> <p>It's funny that 10 year old command prompt utility (this was added in Vista) that everyone's forgotten elicits such an enthusiastic response.</p> <p>Since you all love that stuff, here's a few other "forgotten command prompt features."</p> <center> <blockquote class="twitter-tweet" data-lang="en"> <p lang="en" dir="ltr">Windows folk: Did you know you can pipe cmd prompt commands into the clipboard? <a href=""></a></p>— Scott Hanselman (@shanselman) <a href="">June 20, 2016</a></blockquote><script async src="//" charset="utf-8"></script></center> <p>Some of these have been in Windows since, well, DOS. Others were added in Windows 10. What did I miss? Sound off in the comments.</p> <h3>Pipe command output to the clipboard</h3> <p>In Vista they added clip.exe. It captures any standard input and puts in the clipboard.</p> <p>That means you can</p> <ul> <li>dir /s | clip <li>ver | clip <li>ipconfig /all | clip</li></ul> <p>You get the idea.</p> <p><img title="Piping to Clip.exe puts the standard output in your clipboard" alt="Piping to Clip.exe puts the standard output in your clipboard" src="" width="640" height="344"></p> <h3>F7 gives you a graphical (text) history</h3> <p>If you have already typed a few commands, you can press F7 to get an ANSI popup with a list of commands you've typed. 4DOS anyone?</p> <p><img title="More people should press F7" style="margin: 0px 0px 0px 5px; display: inline" alt="More people should press F7" src="" width="640" height="464"></p> <h3>Transparent Command Prompt</h3> <p>After Windows 10, you can make the Command Prompt transparent!</p> <p><img title="It's see through" style="margin: 0px 0px 0px 5px; display: inline" alt="It's see through" src="" width="610" height="480"></p> <h3>Full Screen Command Prompt</h3> <p>Pressing "ALT-ENTER" in the command prompt (any prompt, cmd, powershell, or bash) will make it full screen. I like to put my command prompt on another virtual desktop and then use CTRL-WIN-ARROWS to move between them.</p> <h3>The Windows 10 Command Prompt supports ANSI natively.</h3> <p>The cmd.exe (<a href="">conhost in Windows 10 1511+</a>, actually) now supports ANSI directly. Which means BBS Ansi Art, of course.</p> <center> <blockquote class="twitter-tweet" data-lang="en"> <p lang="en" dir="ltr">Finally New Microsoft has its priorities straight. Early builds of ANSI Art support making its way into Windows 10! <a href=""></a></p>— Scott Hanselman (@shanselman) <a href="">February 5, 2016</a></blockquote><script async src="//" charset="utf-8"></script></center> <h3>Word wrapping</h3> <p>Oh, and the <a href="">Windows 10 command prompt</a> supports active word wrapping and resizing. It's about time.</p> <h3>Little Fit and Finish Commands</h3> <ul> <li>You can change the current command prompt's title with "TITLE" <li>You can change its size with MODE CON COLS=x LINES=y <li>You can change the colors from a batch file with COLOR (hex)</li></ul> <p>What did I miss?</p> <p> <hr> </p> <p><strong>Sponsor:</strong> Working with DOC, XLS, PDF or other business files in your applications? <a href="">Aspose.Total Product Famil</a>y contains robust APIs that give you everything you need to create, manipulate and convert business files along with many other formats in your applications. Stop struggling with multiple vendors and get everything you need in one place with Aspose.Total Product Family. <a href="">Start a free trial today.</a></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.