Share via


Two Command Line Tricks

Watching a co-worker type can be a good tool for learning new tricks. I always ask "How did you just do that?" when I see something fly by a bit too quickly. I just learned two of them in the last half hour.

  1. If there is a command in your history but you don't want to push the up arrow to find it, you can start typing the command and then press F8 to complete it.
  2. Type "dir | clip" and then open Notepad. Paste from the clipboard to reveal the output of the dir command you ran before. You can use this to pipe any command line output to the clipboard. Type "clip /?" for full details.

Comments

  • Anonymous
    October 19, 2007
    Clip didn't work for me.  Using PowerShell?Michael
  • Anonymous
    October 19, 2007
    clip.exe is only included in Server 2003 and up. Vista is the first client OS to include it.Previously, it was included in Resource Kits for the respective OSes. Clip 1.1 is available on MS FTP:ftp://ftp.microsoft.com/Services/TechNet/samples/PS/Win98/Reskit/FILE/CLIP.EXE
  • Anonymous
    October 19, 2007
    Per chi usa ancora la Command Line
  • Anonymous
    October 23, 2007
    Wow... specially that clip :-)Keep 'em coming!!!
  • Anonymous
    October 29, 2007
    The comment has been removed
  • Anonymous
    October 30, 2007
    The comment has been removed
  • Anonymous
    October 30, 2007
    The comment has been removed