howtogeek at May 24th, 2013 12:36 — #1
Originally published at: http://www.howtogeek.com/163968/add-the-ability-to-copy-the-contents-of-any-text-file-to-your-send-to-menu/
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.).
wisewiz at May 25th, 2013 11:56 — #2
I'm curious as to what anyone would need this for. Copying a .txt file to clipboard is straightforward, and opening a .txt file and Ctrl+A, Ctrl+C copies the contents quickly. Why would you want to use the right-click-filename-SendTo-Clipboard (as contents) function?
Not knocking it AT ALL. Just interested in the peeps' applications for this new shortcut.
Wisewiz (the elder)
anth at May 26th, 2013 11:29 — #6
Two reasons, Dan.
1) it actually is marginally faster in some contexts
2) it's a cool way to illustrate several concepts that will be instructive to many (okay, not THAT many) people
I'm going to do it on one box just for a fun little exercise
faulkner132 at May 26th, 2013 22:01 — #7
When you have to do this for several files, it can save a bit of time.
dr838 at May 28th, 2013 10:19 — #8
I modified the short cut so that it sends a directory listing to the clip board. There are many times I want to 'ls DIRNAME >list.txt' when I don't have a cmd window handy.
My short cut is to a batch file, dirList.bat that contains
dir %1% | clip
Now I can right click on a directory name and send the directory listing to the clip board.
Thanks for the tip.
wisewiz at May 30th, 2013 17:54 — #9
anth, you're absolutely right on both counts (well, except that when I used it to get bat file contents from one comp to another, to paste into a bat I was developing, it was WAY faster, not marginally, than copying the bat file from machine to machine, opening it in a text editor, selecting, copying, and then pasting into the other bat file, and then closing the used bat file). And these forums have a teaching function above all else, I believe.
faulkner132, I tried it, and I liked it.
And dr838, I put yours on my new boxes instead of installing a third-party PrintFolder program. Works for me.
Thanks to you guys and HTG.