I originally converted my Evernote notes using Yarle. Yarle puts all attachments in a folder _resources below the folder containing the note. After a few months of “digital gardening” the links between notes and attachments are in a mess.
There have been two feature requests related to moving attachments with notes:
I am also aware of the Consistent attachments and links plugin
All of these solutions have the potential to interfere with people’s workflows. So I propose a plugin that adds a command for moving attachments.
When the command is invoked it:
- Scans a note to identify all of its attachments
- If an attachment has a single incoming link, move it to the “Default location for new links and attachments” specified in Obsidian’s “Files & links” settings based on the path to the note (see example below)
- If an attachment has multiple incoming links, do not move the attachment
- Rename links in the note to point to the new location of any moved attachments
Example (absolute paths)
- Path to note Folder1/Folder2
- Note has a link to an attachment [[Folder3/_attachments]]
- Invoking the command moves the attachment to Folder1/Folder2/_attachments and renames the note link to [[Folder1/Folder2/_attachments]]
As the command is invoked on demand, it should not interfere with any existing workflows
I would write the plugin myself or maybe even a Templater script but my JavaScript skills are non-existent