How do I make ClickToCopy copy some text rather than string?
You can use CopyToClipboard
:
Button["display text", CopyToClipboard["file name"], Appearance -> Frameless]
CopyToClipboard >> Scope
"Copying a string copies the contents of the string."
Column @ MapThread[Button[#, CopyToClipboard @ #2, Appearance -> Frameless] &,
{{"display text 1", "display text 2"}, {"file name", "Alex E"}}]