I have had a look through the forum archive and can’t seem to find an answer, so here goes!
I would like to spin off a number of my notes into a new vault (which I can then share through Obsidian Publish), but the notes concerned have a number of attachments (predominately screenshots) within them - is there a way of moving them to the new vault whilst ensuring their attachments move with them please?
No. You need to manually move them.
My attachments for important documents have the same basename as the markdown files. For unimportant stuff, I have IMG_ and Screenshot, which is not good practice.
Thanks - I was hoping there might be an automated way of doing it!!
Total numbers of attachments - loads.
Number of attachments I need to move to the new vault - probably not that many, measured in 10s rather than 100s!
Not without a script – which is beyond my capabilities. I don’t know how in a shell script I would get the current filename. Then in a Templater js one may need filesystem permissions (or one could work with Obsidian API). Some wizard could chip in or you could get the input of a chat robot (don’t try the 3.5 free versions, they suck; you need a robot that knows about Obsidian API).
Actually, I think all scripts that can be reused should be put in Share&Showcase and then linked to the Help thread.
This request/job will be a recurring one so we should have a script or two for it.