Keyboard Maestro to batch add section of filename to description

Started by s_smith, May 23, 2023, 09:38:30 PM

Previous topic - Next topic

s_smith

I'm trying to run Exif tool from within Keyboard Maestro. The idea is to take a section of the file name (the ImageID) and then put that into another part of the metadata that can be accessed through lightroom) so I can rename the file but still reference the ImageID.
I have the new image name in the variable %ImageID% and the full filename and path are in %PathFull%

For some reason it isn't execuiting the shell script, or I'm not getting any output.


Execute shell script:

exiftool -overwrite_original "-Description<$KMVAR_ImageID" "$KMVAR_PathFull"

Exiftool is successfully installed.Looking for any advice.

Thank you

Phil Harvey

Quote from: s_smith on May 23, 2023, 09:38:30 PMI have the new image name in the variable %ImageID% and the full filename and path are in %PathFull%

Do you mean %KMVAR_ImageID% and %KMVAR_PathFull% ? --

QuoteExecute shell script:

exiftool -overwrite_original "-Description<$KMVAR_ImageID" "$KMVAR_PathFull"

I really can't help much because I don't know how Keyboard Maestro executes commands.  Perhaps try starting with a command you know that works and build from there.

- 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

Quote from: Phil Harvey on May 24, 2023, 11:06:38 AM
Quote from: s_smith on May 23, 2023, 09:38:30 PMI have the new image name in the variable %ImageID% and the full filename and path are in %PathFull%

Do you mean %KMVAR_ImageID% and %KMVAR_PathFull% ?

Keyboard Maestro appears to be a Mac program. Does a Mac use the % to indicate variables?

But overall, this would be a Keyboard Maestro problem, not an exiftool problem.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Hubert

Just a guess, but you may need to specify the full path to your ExifTool installation:

/usr/local/bin/exiftool
is the default. (You certainly have to with the 'do shell script' command in AppleScript.)