Help with Applying Filename Base to all Images

Started by acabaero, March 13, 2012, 03:11:58 PM

Previous topic - Next topic

acabaero

Hi All!

I'm an Exiftool newbie and would like your help. I have 100+ shot folders all inside a root folder. I would like to apply 2 things to all my images. First, I'd like to add the 'filenamebase' without extension to the 'title field' in the IPTC Core. I have already started this by opening each folder in Photo Mechanic and entering {filenamebase} in the object name field. By doing this it writes the file name with no extension to the 'object name' in Photo Mechanic or when viewing files in Bridge it adds it to the 'title field'. Second, I would like to add a specific date to the images at the same time.

Although Photo Mechanic works, it is very slow to move from one folder to another. I would like learn a way where I can apply the filenamebase with no extension and apply a specified date to all the folders at the same time. Can anyone help me out? I would great appreciate it!!!


Best,
Anthony
Running: OS X 10.6.8




Phil Harvey

Hi Anthony,

Inside the full ExifTool distribution you will find a config file named "ExifTool_config".  Read the instructions in this file to activate it -- it includes a user-defined "BaseName" tag which will do exactly what you want with a command like this:

exiftool "-title<basename" -datetimeoriginal="2011:03:13 15:30:00" "SOME FOLDER"

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

acabaero

Please excuse my ignorance.. How do I find and activate the config file named "ExifTool_config" ?

BogdanH

Hi Anthony,

On ExifTool homepage ( http://www.exiftool.org/ ), there you can download full ExifTool distribution file (on top of the page).
Unpack downloaded file and you'll find Exiftool_config file. This is normal text file -open it with any text editor and read instructions inside that file.

Bogdan

acabaero

#4
Hi Phil,

I tried it again and I am getting this.. And also it is duplicating my images and adding a "_original" too it. Any thoughts?

QuoteLast login: Tue Mar 13 14:45:18 on ttys000
IKE-DI-320-SSD:~ acabaero$ cd downloads
IKE-DI-320-SSD:downloads acabaero$ cd Image-ExifTool-8.83
IKE-DI-320-SSD:Image-ExifTool-8.83 acabaero$ exiftool "-title<basename" -datetimeoriginal="2011:03:13 15:30:00" "test_delete"
Warning: No writable tags set from test_delete/Image_0064.jpg
Warning: No writable tags set from test_delete/Image_0065.jpg
Warning: No writable tags set from test_delete/Image_0066.jpg
    1 directories scanned
    3 image files updated
IKE-DI-320-SSD:Image-ExifTool-8.83 acabaero$


Phil Harvey

Hi Anthony,

The "No writable tags set" error indicates that the config file isn't installed properly.

With the full ExifTool distribution expanded on your Desktop, type this in a Terminal window:

cp ~/Desktop/Image-ExifTool-8.83/ExifTool_config ~/.ExifTool_config

This will activate the config file for you on OS X.

The "_original" files are your original images, but renamed as a back up (to save your ass should things go wrong).  If you already have backups, you can add the -overwrite_original option to delete the original files.

- Phil

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

acabaero

It worked Kirk! Thanks so much. Last question... Below is my folder structure. How do I apply
Quoteexiftool "-title<basename" -datetimeoriginal="2011:03:13 15:30:00" "SOME FOLDER"
to all images in all subfolders? I don't want to have chose every folder one by one. Thanks in advanced!



My images  > Folder1
                  > Folder2
                  > Folder3
                  > Folder4
                  > Folder5

Phil Harvey

Add -r to the command to recurse into sub-folders.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

acabaero

Thanks Phil! Also..will   
Quote-datetimeoriginal="2011:03:13 15:30:00" "SOME FOLDER"
change 'Date Created' field in the IPTC core? Or is it something other than this?

Phil Harvey

The equivalent IPTC Core date/time tag is XMP-photoshop:DateCreated.  So the command should be:

exiftool -xmp-photoshop:datecreated="SOME DATE" ...

or just

exiftool -xmp:datecreated="SOME DATE" ...

See the "iptcCore.args" file in the full ExifTool distribution for a list of all ExifTool tag names corresponding to the IPTC Core metadata.

However, you should be careful to keep the EXIF and XMP synchronized if the image contains both types of metadata.  You can do this by writing MWG:DateTimeOriginal (which updates both EXIF:DateTimeOriginal and XMP-photoshop:DateCreated).  See the MWG Tag Name documentation for details.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).