ExifTool Forum

ExifTool => Newbies => Topic started by: digicolllib on September 20, 2018, 09:59:40 AM

Title: Inserting the Directory Name in the Source Tag
Post by: digicolllib on September 20, 2018, 09:59:40 AM
Hi, All--

I am trying to update the source field for all items in a directory so that the source will say [DirectoryName]/[FileName]. To do this, I am using the command:

exiftool '-Source<$directory/$filename' *.tif

However, because I am in the directory of the images, it is outputting ./[filename] as the Source. Any tips on how to remedy this? I am on a Mac using the tool through terminal.
Title: Re: Inserting the Directory Name in the Source Tag
Post by: Phil Harvey on September 20, 2018, 10:56:30 AM
Use this command:

exiftool -ext tif '-source<$directory/$filename' DIR

where DIR is the name of the directory you want in the Source tag.

- Phil
Title: Re: Inserting the Directory Name in the Source Tag
Post by: StarGeek on September 20, 2018, 01:11:48 PM
Also,
exiftool -ext tif '-Source<FilePath'