Scan note and move all the notes attachements to the "Default location for new links and attachments"

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:

  1. Scans a note to identify all of its attachments
  2. 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)
  3. If an attachment has multiple incoming links, do not move the attachment
  4. 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 :slight_smile:


Thans for your clear writeup. This would be very handy to many users I guess.

In addition I would like to suggest that moving a note, also moves the attachments (if only attached to the note being moved) to the “Default location for new links and attachments” specified in Obsidian’s “Files & links” settings based on the path to the note.
This would be more ‘live’ than after the fact as you suggest.

Does anyone know (maybe @Licat or @Silver) if something like this is on the roadmap to become a native Obsidian feature? It would save so much hassle. Thanks.

1 Like

As a new Obsidian user who imported thousands of notes from Evernote into their vault, I’d love to have this tool, among others.

Admittedly, my Evernote notes were already a disorganized mess that I may not be able to clean up in my life time ( it’s that bad ). The ability to move attachments to a central location and also delete orphaned attachments would low the level of effort for new users to switch to Obsidian.