exporting to original folder from darktable

I have been trying to establish a string to save the processed images into the same folder they originated from.

Background:
when processing images for a specific project they might originate from different folders. For archive purposes I want to save the jpg´s next to the raw files.
i.e.: Save image 20170502_test_01 in → /fotos/archive/2017/20170502 and with the same export run save image 20190201_test_02 in → /fotos/archive/2019/20190201.

All the strings I came up with created new folders instead of using the existing folder.

Any idea if this can be done?
Thanks

Hello, the default setting is the following, which exports selected files to their original folder. So a raw from oct19 will have the jpg stored next to it, while another raw from sep16 gets the processed jpg there.

$(FILE_FOLDER)/$(FILE_NAME)

1 Like

perfect, thanks.
Don´t know how I missed that one…

Can this be modified to keep the substructure but say change the drive…For example I have my folders in C:\DT_photos then subdirectorys by date and event label. I want my exports to go to another location but with the same subfolder structure and name (actually I add “_mod” to them). As you mention above this is easy for the same folder and I can insert a subfolder in front of the file name but I have not figured out how to keep the subfolder portion of the path and subst a new root location…