I just found this thread after solving this another way. At the year’s end, I needed to move all my 2017 photos, organised into lots of folders and subfolders, off my main laptop drive to make space for my 2018 photos. I wanted to keep all of my folder structure and I didn’t want to use the Move feature one folder at a time.
I found the feature “updating folder path” in the darktable manual: “The collect images module has a feature that allows you to tell darktable about the new location of imported folders which have been moved.”
So I quit darktable and copied all of my 2017 photos from my main hard drive to an external drive, moved them to the trash on my main drive, then re-opened my 2017 darktable library. The Collect:Folders module on the left now displayed all of my 2017 folder names struck out.
As the manual explained, I could right click on a struck out folder name and select “search film- roll…” to tell darktable where to look.
There were just a couple of quirks I first had to navigate.
Quirk one was that I’m using darktable on a Mac and the usual Mac equivalent of “right-click”, “ctrl-click”, was not recognised by darktable. After some head-scratching, I found out that the two-finger tap option on my MacBook trackpad is recognised, which allowed me to see and select the “search film-roll…” option.
Quirk two was that after I’d browsed through and selected where a folder had been moved to, nothing happened. (Gulp.) I discovered that I needed to move out from the folders option of the Collect module into another option (I chose film roll) and back again for the changes to show up. (I first tried quitting and reopening darktable, which also worked.)
My folders are organised first by month, and I started by resetting the location of each month’s folder individually, After a couple of months I realised that I could instead navigate up one level in Collect to my “2017” top folder that contained everything and just re-set that with “search film-roll…”.
So, bingo, one year of images organised into lots of folders and subfolders successfully shifted to their new home, without needing to reimport all of the images and their xmp files.