How many times when you’ve been writing a technical document have you had to copy the results of some command from a command prompt window ?
When I was looking for some information about WINSAT for my earlier post, I some lists of new vista commands. Clip is so simple I wonder why it’s taken so long to get it into Windows. Here’s what it says about itself
Redirects output of command line tools to the Windows clipboard.
This text output can then be pasted into other programs.
/? Displays this help message.
DIR | CLIP
Places a copy of the current directory listing into the Windows clipboard.
CLIP < README.TXT
Places a copy of the text from readme.txt on to the Windows clipboard.
How did I get this text in here ? I ran
Clip /? | Clip
and pasted the results into Windows live writer.
One of the things I was trying to check with the memory bench marks I talked about in the WinSat Post, was the time it takes my new camera to write files (answer – roughly speaking it writes a 16MB image file in 2 seconds with my memory cards). What I really want to be able to do is shoot a sequence of files and look at modified time to the second. Which of course a DIR command doesn’t show you. So you have to look at the property pages for each file. FORFILES will process files and let you get at their name, date and time modified (to the second).
Now granted the FOR command which was there when I started working with DOS 3.1 can do a lot of these things. (As a trainer I used to set students the challenge “In testing a network how would I use the command for %f in (*.*) do copy . nul) but FOR doesn’t recurse subdirectories and can’t pass file properties as parameters to the commands it invokes.
Bonus nugget. Remember “Look and Feel” lawsuits ? Remember the recent deal with Novell ? I remember Netware 2.0a had a “WhoAmI” command. So does Windows Vista. Try Whoami /all | clip
This post originally appeared on my technet blog.