Copy the path (either absolute or relative to vault) of a file in the file explorer

Use case or problem

Sometimes it is useful to be able to get the path (either absolute or relative to vault) of a file in the file explorer (i.e., not the current file). For example, if I right-click on “file1.md” I would be able to copy “vault://path/to/file1.md” of “path/to/file1.md” or “/usr/document/vault/path/to/file1.md”.

One example is when using the embed code plugin, but other cases have happened to me.

Proposed solution

right click context menu would offer option to copy path of clicked file, with either several options or a submenu (to save space)

Current workaround (optional)

Of course, it is possible to drag a file into the current file, but if one is using Wiki style, this doesn’t work. Right now, I can open the file in a new tab and get the path using various means, such as the show current file path plugin. However, this seems inefficient.

In many so-called file explorers, such as Finder on a Mac, one can get the path of a file by selecting it via the status bar, or via the context menu using certain plugins.

Related feature requests (optional)

1 Like

Agreed!

I can get the path to the current file/folder if there is an active file easily enough using, for e.g., Shell Command: echo {{file_path:absolute}} >&2

But this only works when there is an active file. Many times it would be useful to grab the path to a file OR folder from the file explorer directly.