Automate converting file path to markdown link

It appears that if you drag a file from the Finder into an Obsidian note (in an iCloud vault), it puts a copy of that file into iCloud. I my case, it’s a Numbers file, and the copy goes into iCloud/Numbers.

I want to have Obsidian link to the file on my local drive, and a link like this works: [description](<file:///path_to_file>)

I want to automate this. The idea is to select the file in the Finder, then invoke a process that grabs the path, converts to the above markdown, and puts it onto the clipboard for pasting into Obsidian.

This seems so useful, I’m thinking surely someone must have already made something, but I’ve searched this forum, plus those for MPU and Keyboard Maestro, and haven’t found anything.

Ideas?

Not exactly a match, but rather than putting it on then clipboard this will just insert at the cursor. It works for multiple files, putting a space between links, and by default will trigger when you type insmdfile. The description is defaulted to the base file name for each selected file.

You could modify it to use the clipboard, but this existing approach circumvents the need I think, and keeps your clipboard history clean.

Hope that helps.

1 Like

Wonderful! Thanks a bunch.

Regards,
Russell