As you may know, Microsoft Windows Vista includes a nifty little command line utility called Clip.exe that that is designed to redirect or pipe the output generated by a command line utility to the Windows clipboard. This can come in handy in a lot of different situations as it allows you to quickly get information from the command line into a Windows application. Using the Clip command is as easy as adding the pipe or the redirection symbol along with the clip command on the command line.
For example, you can use the Clip utility along with the pipe symbol to copy a directory listing to the clipboard:
Dir | clip
Or you can use the Clip utility to copy the results of the Ipconfig command:
Ipconfig /all | clip
You can use also use the Clip utility along with the redirection symbol to copy the entire contents of a text file to clipboard:
Clip < Readme.txt
While each of these uses of the Clip utility can come in handy, the last one was of particular interest to me as I regularly copy the contents of a text file and paste it into a Word document. The more I thought about this capability the more that I wished that I could automate it and make it available in Windows graphical user interface.
As I pondered the possibilities, it occurred to me that the best way to make this happen would be to add the Clip utility to the context menu. I used that technique several times in Windows XP to add DOS commands to the context menu via the File Types tab in the Folder Options dialog box.
However, as I proceeded in that direction and opened the Folder Options dialog box I remembered that Microsoft had removed the File Types tab from Vista's Folder Options dialog box and replaced it with the Default Programs application. While the Default Programs application provides you with the basic features from the File Types tab, such as working with file type associations, it unfortunately doesn't provide you with the in-depth functionality as File Types tab and thereby no way to add commands to the context menu.
That meant I had two alternatives: Find a third-party utility or to delve into the registry via the Registry Editor.
If at all possible, I prefer to avoid editing the registry, if I can. Fortunately, while searching for an alternative to the File Types tab, I found a very nice utility called Creative Element Power Tools that includes a feature called the File Type Doctor that provides many of the features from the File Types tab.
This blog post is also available in the PDF format in a TechRepublic Download.
The Creative Element Power Tools
The Creative Element Power Tools is a program from Creative Element that provides quite an extensive collection of productivity tools. Some of the tools run from the user interface while others, such as the File Type Doctor, run as an extension to the operating system. This program is shareware and installs with a 45-day evaluation period. After the evaluation period, you'll need to register or the program will expire. Registration costs $18.00.
After you download the Creative Element Power Tools, installing it is a snap. You just follow the steps presented by the setup wizard
Using the File Type DoctorOnce you've installed the Creative Element Power Tools, launch it and respond with the appropriate action in the User Account Control dialog box. You'll then see the program's Control Panel where you enable and configure the various tools. To enable the File Type Doctor, scroll down to and select the Edit File Type Associations check box, as shown in Figure A. Then click the Accept button.
You'll enable the File Type Doctor from the Creative Element Power Tools' Control Panel.For the next step, you'll launch Windows Explorer, locate and right click on a .TXT file, and then select the new Edit File Type command, as shown in Figure B. As soon as you do, you'll see the File Type Doctor window shown in Figure C.
Once you enable the File Type Doctor, you'll find the Edit File Type command on the context menu.
The File Type Doctor's interface is very comprehensive.To add the Clip utility to the context menu and configure it to copy the contents of a text file to the Clipboard, you'll begin by clicking the Add button. When you see the Add New Action dialog box appear, you'll type a name for the command in the first text box, the path to Cmd.exe in the second text box, and then type the command line parameters to launch the Clip utility in the third text box as shown in Figure D. To proceed, click the Accept button and then close the File Type Doctor.
To add the Copy to Clipboard command to the context menu for .Txt files, you'll fill in the Add New Action dialog box as shown here.Now, anytime you want to copy the contents of a .Txt file to the clipboard, simply right-click on the file and select the Copy to Clipboard command from the context menu, as shown in Figure E. Keep in mind that when you do, you'll momentarily see a Command Prompt window and there will be a slight delay before contents are copied. However, you can then switch over to your application and simply paste the content into your document.
You can now easily copy and paste the contents of a text file into another document.
What's your take?
Do you use the Clip utility? Do you regularly copy and paste the contents of a text file into another document? Have you missed the File Types tab in Vista's Folder Options dialog box? Will you make use of the Creative Element Power Tools?
TechRepublic's Windows Vista and Windows 7 Report newsletter, delivered every Friday, offers tips, news, and scuttlebutt on Vista and Windows 7, including a look at new features in the latest version of the Windows OS. Automatically sign up today!
Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.