Recursive image renaming (get title from xml file in same folder)

Started by ryanski, September 05, 2021, 10:04:09 PM

Previous topic - Next topic

ryanski

Hi All,

New to ExifTool, just hoping someone may be able to point me in the right direction with ExifTool.

We have 2500 Images from a Digital Asset management system (ResourceSpace).

This system copied original, renamed it, created several different sizes, and out it in a subfolder, created an associated .xml file to store original title, and all associated metadata.

In PHP I have been able to recursively display ONLY the original file, and extract the metadata title for each, next step was to rename the original file with the "Title" from metadata,. and save to a output folder.

Before I attempt the last bit, would ExifTool be able to accomplish this task?

I.e.
filestore
- 0
-- 721534_blah0001.jpg
-- 721534thm_blah0001.jpg
-- metadata.xml<-- dc:title is: My first photo

- 1
-- 431689_blah0001.jpg
-- 431689thm_blah0001.jpg
-- metadata.xml <-- dc:title is: My second photo


Desired output:

output
- My first photo.jpg
- My second photo.jpg

I'll go through the docs, I see I can look into sidecar files.... just hoping someone may have required similar.

Thanks in advance.

Ryan

Phil Harvey

Hi Ryan,

Are you still wanting an answer for this?  I'm catching up on posts since returning from my vacation, but this one would take some time that I don't want to spend if you've already found a solution or given up on this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).