Linking to file on local hard drive

Hello everyone,

Just dloaded Obsidian, test driving it, and can’t figure out a way to link to a file (video, .pdf, etc.) on my local hard drives.

I’ve searched here… there must be a way, and if there is, I must not be searching with the right keywords.

When I find a website page, video, or other such on the Internet, and it’s a page, video, what have you, that I want to keep for potential future reference, or if I find that it’s valuable information… I will download a copy to my hard drive, because most of you have probably noticed by now that Internet links are very fickle things, today your Internet hyper-link works, next week it doesn’t anymore.

So when I save a link to a video, for example, since it’s a video that I consider important enough to save the link to it, I’ll obviously also want to keep a copy of that video on my hard drive, since the video might not be online in the near future.

For example, I’ve created a note inside Trilium called Rosa Koire.

Inside that Rosa Koire note, I will add the name of the video, the YT link to the video, and also, I want to add a hyper-link to the file on my hard drive, so that if the YT link didn’t work anymore, I could just click on the hard drive local hyper-link and the video would play from my hard drive.

Again for example, the contents of my Rosa Koire note in Trilium looks like this:

Rosa Koire, Behind The Green Mask, UN Agenda 21, 6:25:12 part 1 of 4

[Rosa Koire Part 1 of 4](file:///“I:\4K Video Downloader\Rosa Koire, Behind The Green Mask, UN Agenda 21, 62512 part 1 of 4.mkv”)

So in my note, if I Ctrl-click on the YT link, the video opens in a new tab in my browser. The file link, however, I can’t get it to work, I can’t get it to open the video that I have pointed to on my hard drive.

Oh, I should mention that I’ve tried the link by itself this way as well: file:///I:\Politics\Rosa%20Koire,%20Behind%20The%20Green%20Mask,%20UN%20Agenda%2021,%2062512%20part%201%20of%204.mkv

I’ve tried it without the quotation marks as you can see above, and with the quotation marks before the filename and at the end of the filename (so, between the three backslashes and the I:, just after the three backslashes and just before the I:).

The hyperlink seemed to always break at the first space it encountered, so I had to as %20s everywhere there was a space in order to get the hyperlink to not break, but when I do to preview mode, no hyperlink is created from the file:/// link.

Any help would be appreciated. Thanks.

Are you using markdown links?

And btw, you can either replace spaces in file names with %20 or surround your link with <> - for example: <file:///Link/to/file name with spaces.mkv>

1 Like

Thank you alltags, sorry for the late reply, I’d lost awareness of this website, and for some reason, I didn’t get any e-mail notification of your response.

Going to do more testing, since some links would work and others would not, but from what I see so far, your solution seems to be working perfectly… thank you again. :slight_smile:

Now is there some way to have Obsidian “track” these file links so that if I happened to move a file, or files, that the links would self-repair, other than them breaking because of the file move?

I guess there must be a section for 3rd-party plugins on the forum, I’ll look, would be great if someone had, or could program a plugin could scan one’s notes for file links, and where found, would, during light activity, test/check the links to see if they were valid.

Again, this may be out of your range of knowledge or expertise, but I’ll ask anyway in case you just happen to know offhand, I’m running Obsidian in dark mode, and oftentimes of course, one needs to highlight, but the highlighting is in a dark blue colour that blends in too well with the background, and oftentimes it is difficult to distinguish exactly where the highlighting starts or stops.

Somewhere, surely there is a setting (or an .xml file that can be edited?) to change the highlighting colour?

As to the plugin question:

I don’t think such a plugin would make sense (and, honestly, I personally wouldn’t want such a plugin) as you would have to grant permissions to read your complete hard drive, even outside your vault. You can, however, put the downloaded files directly into your vault - then, if you move them into another (sub-)folder, all links will be adjusted automatically. Pdf files can the be opened directly within obsidian, other files (like images, videos etc.) should be opened with the respective default application.

As to your other question regarding styling:

You can adjust the appearance of every single element by using custom css. I guess by “highlighting” you mean selecting text with the cursor?

If so, create an empty text file with the following content:

.theme-dark {
    --text-selection: green;

Adjust the color according to your needs.

Save your file as select.css under path_to_your_vault/.obsidian/snippets, then go to your obsidian settings → appearance → css snippets and activate the snippet. This should do it.

For an introduction in customizing obsidian with css, have a look here for example.


That worked splendid, orange highlight works great, going to look some more into those customizations (link you provided).

If you’re using Windows, you might find this interesting and very useful:

And this one as well that I use all the time:

Thank you once again for your help.

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