how to add pdf 'title' metadata to match filename for mutiple pdf files

Started by drramimagdi, March 31, 2022, 07:56:54 PM

Previous topic - Next topic

drramimagdi

if it's possible...
i have several pdf files
i want their metadata 'title' to be the same as the filename
can this be done?

StarGeek

The basic command would be either
exiftool "-Title<Filename" /path/to/files/
if you wanted to include the extension or
exiftool "-Title<Basename" /path/to/files/
for the filename without the extension, but requires version 12.22+

But you may have to write to multiple title tags.  It's been a while since I checked but Adobe Reader would read any of the following four tags for "Title".  It may be different for other software.
XMP-dc:Title
XMP-pdf:Title
XMP-xmp:Title
PDF:Title

You'll have to test and see if the above command works for you or not.  Otherwise you can replace Title with one or more of these tags that include the group location.  For example, you could use this to cover everything
exiftool "-XMP-dc:Title<Basename" "-XMP-pdf:Title<Basename" "-XMP-xmp:Title<Basename" "-PDF:Title<Basename" /path/to/files/
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype