ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: REDFENIX on November 23, 2012, 05:09:29 PM

Title: name of file in Title TAG
Post by: REDFENIX on November 23, 2012, 05:09:29 PM
hi,

i need help.

I need a command for exiftool to put a name of pdf file in the title TAG...

like : title="original_name.pfd by exiftool"

thanks

Title: Re: name of file in Title TAG
Post by: REDFENIX on November 23, 2012, 05:58:37 PM
problem solve!!!

command line is : exiftool"-Title<myname" *.pdf

and code of .exiftool_config is:



%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Composite' => {
        MyName => {
            Require => 'FileName',
            # remove "_code.pdf" from end of FileName
            ValueConv => '$val =~ s/_code\.pdf//; $val',
        },
    },
);


thanks
Title: Re: name of file in Title TAG
Post by: Phil Harvey on November 23, 2012, 06:28:37 PM
Since you want the whole file name in the title, you don't need the config file and you can use this command:

exiftool "-Title<FileName" *.pdf

- Phil

Edit: Added missing space in command after "exiftool"
Title: Re: name of file in Title TAG
Post by: REDFENIX on November 23, 2012, 06:33:43 PM
hi, thanks for help.

but i have one problem ... i need the file name and more text.

example:

Title = name of file + "by exiftool"

Title: Re: name of file in Title TAG
Post by: Phil Harvey on November 24, 2012, 07:09:42 AM
You do that like this:

exiftool "-Title<$FileName by exiftool" *.pdf

But if you are on Mac or Linux you must use single quotes instead of double.

- Phil
Title: Re: name of file in Title TAG
Post by: REDFENIX on November 25, 2012, 07:11:48 PM
thanks Phil...

exiftool is the best...