Author Topic: Link to file in clipboard  (Read 78 times)

Bernd

  • Junior Member
  • **
  • Posts: 13
    • View Profile
Link to file in clipboard
« on: November 22, 2020, 13:56:06 »
I am trying to do the following thing. I copy a file with Ctrl+C (not necessarily in MC); then I navigate to a folder in MC, use a User Defined command (or something else) to create a lnk file to point to the file in the clipboard. But I don't know how to get the path to the file in the clipboard - GetClipboardText() doesn't do it. And I don't know how to create a lnk file pointing to that path.

AlanJB

  • Power Member
  • ****
  • Posts: 317
  • VERY old Programmer
    • View Profile
Re: Link to file in clipboard
« Reply #1 on: November 22, 2020, 16:47:33 »
The clipboard does not exist as a file system object (like a file or folder) so you cannot link to it.

"The clipboard" is a memory object dynamically created as it is needed.

Bernd

  • Junior Member
  • **
  • Posts: 13
    • View Profile
Re: Link to file in clipboard
« Reply #2 on: November 22, 2020, 17:19:39 »
That‘s a misunderstanding. I don‘t want to link to the clipboard but I want to link to the file at the place where I copied it with Ctrl+C to the clipboard. Very much like you can Ctrl+C in Windows Explorer and then can create a link via the right click menu. Unfortunately it seems, MC can‘t do this out of the box.

AlanJB

  • Power Member
  • ****
  • Posts: 317
  • VERY old Programmer
    • View Profile
Re: Link to file in clipboard
« Reply #3 on: November 23, 2020, 11:05:47 »
Yes - I misunderstood - sorry.