How do I create links to unsupported file types (word files, PowerPoint presentations, etc.) to open in default app or finder/explorer

I recall that you could do this, but don’t really know the format of the link, I think it used this format: []() with 20%s as spaces ¯\_(ツ)_/¯. I could be mistaken tho

Don’t necessarily want to embed these as I know they’re unsupported (we’ll leave that to another feature request), but I just want to open these files in their default apps and perhaps from finder/file explorer as well.

1 Like

file:///path/to/directory/some%20file%20name.pptx is the rough structure of the path and filename. Spaces are URL-encoded as %20, FYI—it’s not an Obsidian-specific thing. (There may be other characters that need to be URL encoded too.)

For an alternative approach, on the Mac/iOS, I use DEVONthink to maintain my files, mainly because DEVONthink provides a permanent unique URL for every item in a database. If you move a file you link using the above format, the link will break; DEVONthink or other related apps provide a sustainable alternative.

1 Like

Found the following:

[some name for the link](file:///c:/your/path/name%20of%20your%20file.pdf) will open the pdf in an external viewer.

[[./relative path/name of your file.pdf]] will open within Obsidian.

3 Likes

I’m on a Windows machine and would love to link to other file types. Both formats don’t seem to work for me. Should I replace the forward slashes with back slashes?

Have you been able to resolve this?

Thanks for the reminder! I had tried replacing %20 for the spaces initially and that didn’t seem to work. Just now I added file:/// to the start of the path and it worked!

Now I need to figure out a way to script something to replace the spaces and add the file:/// at the start of the path to quickly link to all file types on my system.

Hope this helps you too!

Obsidian now includes a preference in the Files settings to recognize all file extensions. If you enable this and you place the files in your vault, you can link to them the same way you do any other links in Obsidian.

1 Like

Thanks Ryan! This is a great new feature but I was looking for a way to link to files outside my vault.

The “File Path to URI” extension makes this process even easier thanks to Michal Bureš.

1 Like

Glad you could resolve it.
I don’t think you will have to write a script. There is now a community plugin from Michal Bureš that lets you convert standard paths to URI paths.

:grinning: You beat me to it!

Just tried Michal’s plugin which works extremely well.

Link to its Github page here if anyone wants it: