I have competition images which have names like Another Beautiful Sunset_Joe Bloggs.jpg. That is Title[underscore]Author's name.
What I need to do is take the text before the underscore, and copy that bit to the Title field, and take the text after the underscore, and copy that bit (without the file extension) to the Author/Creator field.
I've done this sort of thing 50 years ago with recursive subs in Basic (!), but have no idea where to start looking to do this in ExifTool. Any help greatly appreciated.
Try
exiftool "-Title<${Filename;s/_.*//}" "-Creator<${Filename;s/.*?_(.*)\.[^.]+/$1/;}" FileOrDir
This command uses the Advanced formatting feature (https://exiftool.org/exiftool_pod.html#Advanced-formatting-feature) to apply a perl Regular Expression (RegEx) to split the filename into the appropriate strings.
Wow, I know I could never have worked that out myself. Grateful thanks.