How to link a local file in Obsidian?

How to link a local file in Obsidian?
Like a csv file being located on file:////Users/bruno/Dropbox/Obsidian\ Vaults/ClippingContents/statswords.csv
Usually with image or pdf, we would have This is an Image, therefore how to get that csv file location in Obsidian.

markdown link will work for you: [filename](file:///<absolute-path>)

for your case it would be [statswords.csv](file:///C:/Users/bruno/Dropbox/Obsidian/Vaults/ClippingContents/statswords.csv)

Note that any whitespace in the path should be replaced by %20

1 Like

Also, you can simply type [[ and then start entering filename if it’s below Obsidian vault in the folder structure.

I have tried and it does not seem to work, even though tried to get that file in the vault (either xlsx or csv file) they are both not taken in.

1 Like

Is there a proper way of doing this, because it works whether I use back slashes or forward slashes in everything after file:///. For example, both of these work:
file:///D:\film\filmname.mp4 and file:///D:/film/filmname.mp4

I just want to ensure that I won’t have to go through all my files later and replace slashes.

I tried to apply the answers in this thread to create a link in Obsidian to an external, local file on my hard drive but unfortunately I couldn’t get it to work. I was careful to check all the things I might be doing wrong but I just could’t get it to create a link. The file is an MP4 file on a local, internal hard drive. Ideally I wanted to create a link to the enclosing folder. I guess I will keep looking and trying to learn more in hopes of figuring it out. Thanks.

I have managed to make this sort of work but most of my files and folder names have got spaces in them so need the %20 adding.

Is anyone aware of an easy way to create a URL with the space code already in it? I am on a Mac.

I use Service Station for this. It can add custom scripts to the Finder right-click menu. So I have a little script that grabs the filename and url-encodes it into an Obsidian-format link.

I also use that same script in an Alfred workflow, so I can do the same thing for any file/folder that I search for in Alfred.

Here’s a link to a gist of my script, in case anyone wants to borrow it.

You don’t have to replace spaces if you enclose your path in <> :

[Text](<file:///path to file.pdf>)