I have several slides that all have 3 text layers (title, author, filename). The problem is I am trying to batch rename these files using the "filename" text layer. Here is the meta tag info:
Text Layer Name : Title, Author, filename
Text Layer Text : Welcome and Introductions, Christopher Ahmad MD, iem-testdata\script\09-20-19_Americana_Ball_0725_Ahmad.avs
I use this command line:
exiftool "-FileName<${XMP-photoshop:TextLayerText;tr/-_0-9a-zA-Z//dc}.%e" "Y:\iem-testdata\gfx\TitleSlides"
The result is a filename that is a concatenation of all 3 text layers instead of just the "filename"
filename result: "Y:\iem-testdata\gfx\TitleSlides\WelcomeandIntroductionsChristopherAhmadMDiem-testdatascript09-21-19_Americana_Ball_0725_Ahmadavs.psd"
I think the solution may be in the regex but I'm not too good at manipulating string data. Is there a way to just get the filename from the Text Layer Text tag?
Try this:
exiftool "-FileName<${XMP-photoshop:TextLayerText;s/.*,\s*//;tr/-_0-9a-zA-Z//dc}.%e" "Y:\iem-testdata\gfx\TitleSlides"
- Phil
Oh yeah! That did it. I thought I would post the command that works great on Windows CMD batch script. I just hit the donate button as well. This is an amazing tool.
exiftool "-FileName<${XMP-photoshop:TextLayerText;s/.*,\s*//;tr/-_0-9a-zA-Z//dc}" "%CD%" > title-log.txt 2>&1
I got your donation, thanks!
- Phil