I have imported notes from Evernote. Most notes are imported this way, example used here:
Evernote folder was “Legal”.
Evernote note name was “Contracts”. The note contains 1 attachment called in this case “Agreement123”.
Now in Obsidian:
The way things were imported in Obsidian TYPICALLY (but not always):
In vault there is a folder “Legal”.
Inside there is a folder .attachments.
The Obsidian note “Contracts” is now saved in the “Legal” folder.
The attachment “Agreement123” is saved inside .attachments folder in a subfolder there called “Contracts”. Its path is: Vault > Legal > .attachments > Contracts…
And I am perfectly happy with this. This is how I want it.
The issue is as I mentioned, in some cases, the attachments were not placed into the .attachments folder when certain notes was imported. I don’t understand why it happens (I re-run it multiple times to test) but it seems Evernote notes containing 1 attachment only, or notes that contains only attachment were typically imported in this alternative way:
The obsidian note “Contracts” is saved in the “Legal” folder.
The attachment “Agreement123” is saved directly in the “Legal” folder along with the note.
About 2/3 of my notes were saved correctly (the way I want) and about 1/3 imported the the other way.
So obviously it’s not pretty now because I have some attachments in .attachments folder in their respective subfolders there, while many attachments are lurking around alongside with the notes in the main folder.
Is there a way to clean it up?
I would like to move those notes to were they should be (where xxxxx is the name of the note).
Vault > Legal > .attachments > xxxxxxxx… > …
Maybe some sort of script to deal with it?
I already tried copy and move notes, merge notes etc… to see if the attachments get cleaned up, but no, the attachment remains where it was saved initially.