Welcome to MSDN Blogs Sign in | Join | Help

System.Blog.Martens.Ben

The Tech Blog of Ben Martens
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.
Posted: Friday, October 19, 2007 5:06 PM by benmartens

Comments

Michael said:

Clip didn't work for me.  Using PowerShell?

Michael

# October 19, 2007 9:10 PM

n4cer said:

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

# October 20, 2007 1:20 AM

Normal people bore me! said:

Per chi usa ancora la Command Line

# October 20, 2007 3:10 AM

rahulso said:

Wow... specially that clip :-)

Keep 'em coming!!!

# October 23, 2007 8:52 PM

CascadeSkier said:

The last post I made with command line tricks was well-received so I thought I'd post another little

# October 29, 2007 8:52 PM

System.Blog.Martens.Ben said:

The last post I made with command line tricks was well-received so I thought I'd post another little

# October 30, 2007 1:11 PM

Noticias externas said:

The last post I made with command line tricks was well-received so I thought I'd post another little

# October 30, 2007 2:07 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker