One of the things I frequently perform is copying the path of a file in a SharePoint library, not creating a link via the ‘Share’ menu.
There is a copy path icon in the details section of the file in SharePoint.

There is however one annoying caveat for this function. It is always beneath the ‘Activity section’, which on a file with a lot of activity is constantly loading. This makes the ‘Copy path’ option always move down right before I manage to click on it.
I was in the process of learning to build webparts for SharePoint. So I ended up writing an extension that adds a ‘copy path’ option to the menubar of the document library.


Afterwards you can paste the link from your clipboard! 🙂
You can find the source code for this extension in my Github Repo.