Absolute path of link, how ??

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
skorefish
Posts: 8
Joined: Fri 16 Jan, 2015 11:50

Absolute path of link, how ??

Post by skorefish » Fri 16 Jan, 2015 12:09

Hello,

I just installed FAR and I like it so far :wink:

I find it very useful to have a directory with links to my favourite places.
But when I click the link I only get the relative path starting from that directory.

How can I get the absolute path? I want to copy it in my clipboard.

skorefish
Posts: 8
Joined: Fri 16 Jan, 2015 11:50

Link with absolute path???

Post by skorefish » Fri 16 Jan, 2015 12:32

hallo,

is it possible to create links to dir with an absolute path?

skorefish
Posts: 8
Joined: Fri 16 Jan, 2015 11:50

Absolute path of link, how ??

Post by skorefish » Fri 16 Jan, 2015 12:50

well,

when I create a link in windows I can see the absolute path in explorer.

User avatar
John Doe
Бюрократ
Posts: 11143
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 12 times
Been thanked: 73 times

Absolute path of link, how ??

Post by John Doe » Fri 16 Jan, 2015 13:19

skorefish wrote: I want to copy it in my clipboard.
Try execute this in cmdline: lua:far.CopyToClipboard (far.GetReparsePointInfo (APanel.Current))

skorefish
Posts: 8
Joined: Fri 16 Jan, 2015 11:50

Absolute path of link, how ??

Post by skorefish » Fri 16 Jan, 2015 14:10

Wow thx, it realy works.. :Yahoo!:

Where can I learn code like this ?

User avatar
John Doe
Бюрократ
Posts: 11143
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 12 times
Been thanked: 73 times

Absolute path of link, how ??

Post by John Doe » Fri 16 Jan, 2015 14:16

%FARHOME%\Encyclopedia

Here is ready to use macro:

Code: Select all

Macro { description="Copy link destination to clipboard";
  area="Shell"; key="AltShiftIns";
  uid="43F9FF40-70B0-4308-B8C8-7262FB905757";
  condition=function()
    return not (APanel.Selected or APanel.Plugin and band(APanel.OPIFlags,far.Flags.OPIF_REALNAMES)==0)
  end;
  action=function()
    local path = far.GetReparsePointInfo (APanel.Current)
    if path and path~="\\" then
      far.CopyToClipboard (path)
    else
      Keys"AKey"
    end
  end;
}

skorefish
Posts: 8
Joined: Fri 16 Jan, 2015 11:50

Absolute path of link, how ??

Post by skorefish » Fri 16 Jan, 2015 14:50

you make my day !!! Thx a lot.

Post Reply

Return to “Support and Troubleshooting”