Can moving between folders also move the attachments?

I have the Obsidian option set to put attachments in a a subfolder (“_attachments”) within each folder.

I’ve noticed that if I move a note from one folder to another, attachments do not move with it. The reference within the note changes (say, from “./_attachments/foo.jpg” to “./oldfolder/_attachments/foo.jpg”) to keep the attachment attached. But I would prefer that if the particular attachment is only used by one note, the attached file itself should also move along with the note from one folder to another. Is there an option to make this happen?

Or is there a plugin that moves attachments that are are in different folders than their notes into the same directory’s attachment subfolder?

Similarly, once something is attached to a note, and then the note is edited to delete the reference to the attachment, the file is still in the attachment subfolder. Does it never go away? Is there a feature or a plugin that finds and deletes orphaned attachments that are no longer referenced by any note in the vault?

There are two plugins that can do what u want. Though the first one sort of able to do both organize n clear unused attachment.

4 Likes

That looks like exactly what I need, thanks for the tip!

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