Board logo

subject: How to Create a Context Menu Item to Copy a Text File To the Clipboard in Windows 7 or Vista or XP [print this page]


How to Create a Context Menu Item to Copy a Text File To the Clipboard in Windows 7 or Vista or XP

Are a fan of using text-format files to store your information? Have you ever feel annoying and troublesome when you want to copy information to the clipboard? Here we will take a look at how to achieve it by creating a context menu item to copy a text file to the clipboard rather than do some messy steps: open the file in notepad, select all you want, than copy to the clipboard...

Note: This tip is suitable for Windows 7/Vista/Xp users.

Using the Copy to Clipboard Hack

Just hold down the Shift key and right-click on a text file, then you'll see a new item for "Copy to Clipboard":

Now you'll have the information on the clipboard for easy pasting into whatever application you'd like as the screenshot shown below.

Note: If you are just a Windows XP computer user, you can download clip.exe from Microsoft. Just save the file in the Windows directory and the rest of the hack should work for you.

Manual Registry Hack (for .txt files)

Simply open up regedit.exe through the Start Menu search or run box, and then browse down to the following key:

HKEY_CLASSES_ROOTxtfileshell

Under each file type in the registry (for instance txtfile), there is a shell key with a list of actions under it. Here we create a new key called "copytoclip", and then a key under it called "command". Set the default value of "copytoclip" to something useful like "Copy Contents to Clipboard", and then set the default value of "command" to the following:

cmd /c clip < "%1

What we're doing is running a command prompt, and then piping the file into the clip.exe utility. You could do the same thing from the command prompt, or in a script.

Note: Also you can duplicate this same tweak for other file types (like html or code files), by finding their key in the registry and adding the same menu items.

Downloadable Registry Hack

Just download, extract, and double-click on CopyContentsToClipboardTXT.reg to the clipboard. You can remove the hacks with the RemoveCopyContentsToClipboard.reg file.

Just remember to hold down the shift key while right-clicking on a text file.

Welcome to http://www.newton360.com to get more information.

You can visit http://www.newton360.com/Detail/How-to-Create-a-Context-Menu-Item-to-Copy-a-Text-File-To-the-Clipboard-in-Windows-7-or-Vista-or-XP.html to read the original article.

You can get more Windows 7 tips, Windows 7 Wallpapers, Windows 7 Software from http://www.Newton360.com




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0