Link to file/folder in properties

What I’m trying to do

Does anyone know how to properly add a link to a file/folder using Properties?

Things I have tried

I have tried all sorts of formats that work inside the main body, but none of them render as a link when put in properties.

The most general version I could find is

<file:///path_to_file>

It works if you enter it in the browser. The browser will open a file, say, a PDF. In the main body, you would enter it as [link_name](<file:///path_to_file>).

But if you enter [link_name](<file:///path_to_file>) as a property value, it simply does not render at all. If you enter <file:///path_to_file>, it does not render as a clickable link, only text.

Are you talking about other notes and folders within your vault, or stuff outside of your vault?

If the former you can add "[[Your note]]" as the property value, and it’ll link. If it’s to other files outside of your vault, it sure seems like the pure file link works as expected. I’m not sure if you’re able to alias those links though. At least I’ve not found an easy way to do so in a quick test round.

But I did succeed making a file link as a property value like: file:///Users/username/Downloads/filename.png

Thank you for the clarification, I am talking about external files that are not in vault.

Ok, I think I see what my problem was. Spaces in the file name. If there are no spaces, it works just as file:path_to_file. But if there are any spaces, it seems that the only way to make this work is by replacing the spaces with %20.

When you try to protect the file name using either <> or "" the property does not parse it.

Thank you for checking it!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.