Inserting the Directory Name in the Source Tag

Started by digicolllib, September 20, 2018, 09:59:40 AM

Previous topic - Next topic

digicolllib

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.

Phil Harvey

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
...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 ($).

StarGeek

"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