How To Create a Context Menu Item to Copy a Text File To the Clipboard

By 01/02/2012How To

Hello lovely people 🙂

In this entry of our computer repairs How To blog we will talk about creating a context menu Item to copy a text file to the clipboard.

This trick is particularly good for those people who, like me, like to  keep a lot of information stored in text-format files on the drive. You no doubt know the protracted process of doing it the ‘normal way’ but, what if you could do it with a simple context menu item instead?

You can do this just that by using a little registry hacking and the clip.exe utility that comes built into Windows 7 and Vista and, as a handy bonus you can also hide it behind the Shift + Right-Click. This trick will allow you not to waste space on the menu unless you hold down the shift key.

This is how you do it.

Simply hold down the Shift key and right-click on a text file, and you’ll see a new item for “Copy to Clipboard”:

How To Create a Context Menu Item to Copy a Text File To the Clipboard 1

You now have all the information on the clipboard ready for easy pasting into whatever application you’d like:

How To Create a Context Menu Item to Copy a Text File To the Clipboard 2

Windows XP users, go ahead and  download  clip.exe from Microsoft. Just save the file in the Windows directory.

Manual Registry Hack (for .txt files)

Go to the search or run box, or start menu and open up regedit.exe, and then browse down to the following key:

HKEY_CLASSES_ROOTtxtfileshell

How To Create a Context Menu Item to Copy a Text File To the Clipboard 3

Below each file type in the registry (for instance txtfile), there is a shell key with a list of actions under it. For example, we will create a new key called “*copytoclip*, and then a key under it called “command”. Set the default value of “copytoclip” to something useful that describes what it is – like *Copy Contents to Clipboard*, and then set the default value of*command* to something less human friendly by great for your machine like the following:

cmd /c clip < “%1″

What we are doing is running a command prompt (you have all heard of these and used them more than once). If you feel comfortable operating in this mode, you can use the same trick for other file types.

Well, I hope this has helped in you computer DIY efforts but if you are lost give out computer repairs boys and girls a call and they will sort you out.

Over and out

MobileGeekette

Call Now Button1300 883 021