James O'Neill's blog

Windows Platform, Virtualization and PowerShell with a little Photography for good measure.

CLIP and ForFiles my new favorite Vista tools

CLIP and ForFiles my new favorite Vista tools

  • Comments 2
  • Likes

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

CLIP

Description:
Redirects output of command line tools to the Windows clipboard.
This text output can then be pasted into other programs.

Parameter List:
/? Displays this help message.

Examples:
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

 

Technorati tags: , ,
Comments
  • All three tools you mentioned have been available for about 10 years now, they were part of the Resource Kits for Windows NT 4.0 and Windows 2000, and they were also in Windows Server 2003.

    Also new to Windows Vista are SETX (to add a new system or user environment variable), TAKEOWN (to re-assign file ownership), TIMEOUT (wait for a specied number of seconds), WAITFOR (sends or waits for a signal on a system) and WHERE (search for files in the PATH or recursively from a specified directory).

    Also note that ROBOCOPY is now part of Windows for the first time.

  • I'm glad Ewan has started blogging again. He has loads and loads of unique and off the wall hints and

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment