ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: bungaman on May 24, 2023, 10:51:50 AM

Title: reversing first name and last name
Post by: bungaman on May 24, 2023, 10:51:50 AM
how would one reverse first name and last name in xmp face tags?  any suggestions.
Title: Re: reversing first name and last name
Post by: Phil Harvey on May 24, 2023, 11:16:51 AM
Maybe something like this:

exiftool -api filter="s/(\S+) (\S+)/$2 $1/" -tagsfromfile @ -TAG1 -TAG2 FILE

where TAG1 and TAG2 (etc) are the tags you want changed.  This will swap the first 2 words of the tag value.

- Phil
Title: Re: reversing first name and last name
Post by: bungaman on May 24, 2023, 12:28:54 PM
worked great - thanks for the quick response!!!
 ;D