Move raw file together with the corresponding XMP file

Started by RagerPick, June 28, 2023, 01:26:32 PM

Previous topic - Next topic

RagerPick

I have a folder with raw files and their sidecars. I tried to move the raw files together with their corresponding sidecar to folders based on part of their filename.

2022-08-20_102027_IMG_0240_(selection).xmp
2022-08-20_102027_IMG_0240_(selection).cr2

I tried to extract the first 10 characters of the file (date) and turn it into the corresponding directory. However I can't get it to work because I never used regex before and im fairly new to exiftool.

I tried the following command but it probably doesn't make any sense:
exiftool '-directory<${filename;^.{0,10}' /Volumes/Extreme_SSD/photography/selection/selection_raw_sidecar/2023-06-28_srw -i HIDDEN

RagerPick

If any of you know a better and more efficient way to move corresponding XMP and raw files together please don't hesitate to mention.

RagerPick

So im sorry for this topic. I thought exiftool wouldn't be able to extract the creation date of an image in an xml file. I should have just tried ;)