We have previously covered how to add the ability to copy the contents of a TXT file to the right-click context menu, however this method would require you to create a separate registry entry for each type of file you wanted the ability to do this with (e.g. JS, BAT, LOG, HTM, CSS, etc.).
As an alternate method, you can easily add this functionality to your Windows Send To menu, which enables this feature for any type of file without having to touch the registry.
Add the Send To Shortcut
Open your Send To folder location by going to Run > shell:sendto
Create a new shortcut with the command:
CMD /C CLIP <
Give a descriptive name to the shortcut.
That’s it. You can now click on any file and, using this new shortcut, send the contents to the clipboard.
It is important to note, however, that if you were to select a non-text file (for example, a PDF or PNG) and use this shortcut, the contents of the file would not copy correctly as these formats are binary data as opposed to text data.
Changing the Icon
By default, the icon for the shortcut will appear as a command prompt, but you can easily change this by editing the properties of the shortcut and clicking the Change Icon button. We used an icon located in “%SystemRoot%\System32\shell32.dll”, but any icon of your liking will do.
- › How to Send the Contents of the Clipboard to a Text File via the Send to Menu
- › Your iPad Will Soon Work With USB Webcams and Cameras
- › Get Ready for More File Explorer Changes in Windows 11
- › Save Big on Our Favorite Wireless Mice, Laptop Cooling Pads, and More
- › Acer Aspire Vero 15 (2023) Review: A Nice Green Laptop With Some Flaws
- › How VPN Encryption Works
- › 4 Wildly Popular Apple Products That Were Criticized at Launch