Link to external files


Is there a way to create links to files outside the obsidian directory, particularly where the path contains spaces?

So far I can get such links to work using [readable name](file://path-here) but the link doesn’t render in preview and is only clickable in editor mode. Simply using file://path-here doesn’t render as a link or work in the editor.

This looks like I might be trying to achieve the same as the OP of this graveyarded bug and would be related to this post as well.

Any help is greatly appreciated. Loving Obsidian so far but this would be really useful for my job and I’m sure others would find it to be too.


EDIT: I have resolved my own issue. Discovered within the format help doc that you can escape spaces in links by enclosing it in <> (in much the same way as windows uses “” to enclose file paths with spaces).

Therefore it is possible to use a markdown link to link to external files like so: [pretty filename](<file:///path to file with spaces.extension>) which will create a clickable link in preview titled “pretty filename”.

Note that the link doesn’t work in editor mode (ctrl + click registers it as a link but opens a windows dialog “you’ll need a new app to open this app link”. I assume this is a bug.


I found the most reliable way to do links is to do a fully converted webbrowser style URI. In this, spaces become %20. There is no easy way to type such a link, but I found and adapted a Windows shell extension so I can send any file to the clipboard as a pastable Obsidian link.

I can post C# source code later. Could also post a binary program, but I don’t know right ways to do that.

1 Like

Thanks, replacing spaces with %20 solved the problem. Just need to find a way to simplify link conversion.

This was my solution, in Windows:

using System;
using System.Windows.Forms;
using System.IO;

namespace AbsoluteUriGenerator
  class Program
    static int Main(string[] args)
      if (args.Length != 1)
        var executableName = typeof(Program).Assembly.GetName().Name + ".exe";
        Console.WriteLine("Usage: {0} pathToConvert", executableName);
        Console.WriteLine("Example: {0} \"C:\\foo\"", executableName);
        return 1;

      var path = args[0];
      Console.WriteLine("Resolving file:// URI of path: {0}", path);
      var uri = new Uri(path).AbsoluteUri;
      var name = Path.GetFileName(path);

      Console.WriteLine("Setting clipboard to resolved file:// URI: {0}", uri);
      Clipboard.SetText("["+name+"](" + uri + ")");
      return 0;

Adapted from

If you compile this, you can copy that to your shell:sendto folder, then right click on any file and click send-to and click Copy_URI. Gives you any file on your computer.

1 Like

I’m not able to click the link in Preview even after enclosing the absolute path within <>.

e.g. [Perspective Taking](<file://Users/JL/Documents/ACT Immersion/Perspective Taking.pdf>)

Using version v0.10.8

Is it supposed to open up the file with the system default app?


There is a problem mentioned before, ther are spaces in your URI.
A new plugins “File path to URI” can help you.

It works now, Thank you Fules!

On macOS you can create an AppleScript script, which saves URLs of selected files in Finder to the clipboard:

tell application "Finder"
    set _sel to (get selection as alias list)
    set _urls to {}
    repeat with _file in _sel
        set _url to URL of _file
        set end of _urls to _url
    end repeat
    set AppleScript's text item delimiters to return
    set the clipboard to (_urls as string)
end tell

Save this script as Copy URLs.applescript and put it into the ~/Library/Scripts/Applications/Finder/ folder. Now you can select a file in Finder and run the script via the Script menu, located in the OS menu bar (make sure the option “Show Script menu in menu bar” is checked in the General tab of the Preferences dialog of the Script Editor app). The URL of the selected file will then be copied to the clipboard and can be pasted into an Obsidian document. You may also assign a keyboard shortcut to the script.


It works beautifully! Thank you so much!

Is there a possibility to open .pdf on exact page?

on web browser works
on windows
AcroRd32.exe /A page=3 “c:\path_to_file\File.pdf”

How to do that in obsidian? :slight_smile:


I have never tried, but the “Better PDF plugin” is about it.
Read it, how I remember he uses the “#page” format.

1 Like

i just realized that i can’t open [title](C:\some-file.pdf) in preview mode. it opens it in edit mode.
and there is no spaces in the link i am testing it with and i am using core obsidian to test. can someone please tell me what should i do or where to look?

Though this is an older topic, I ran into an issue with links to external files not functioning as expected between the Editor and Preview modes, despite following some of the instructions on this page.

Per the official help docs, you can also enclose links with spaces in angle brackets (<>). Using this convention looks to be properly picked up by the parser.

[pretty name](<file:///drive:\path to file\file.ext>)

Using %20 did not function properly in Preview (but did work in the ‘link’ portion of the Editor mode). Hope this helps some other people trying to make heads or tails of this.