rename file to a tag-information

Started by klal, August 27, 2010, 09:11:07 AM

Previous topic - Next topic

klal

Hello,
how do I rename a file to a tag information automaticly?
I want the tag $make as a part of the filename.

The camera-type should be shown in the file name.
klal

Phil Harvey

Hi klal,

The basic command looks like this:

exiftool "-filename<${make}_other_text.%e" DIR

Where DIR is the name of a directory containing the images.  Note that you must use single quotes (') instead of double quotes (") if you are on a Mac or Linux.

On the right hand side of the "<", you may place any text or tag names beginning with "$".  Curly brackets are necessary around the tag name if the next character is A-Z, a-z, 0-9, - or _.

Have fun!

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

klal

Thank you for youre answer but, sorry maybe I´m to stupid ...  :-\

I have this little shell script, it works fine.
But I dont understand how to integrate the tag "make".

Is there a variable like %x for the formated string?


IMPORT=$(pwd)
GALLERIE="/home/klaus/Bilder/Test2/FOTO-TEST"
[ -n "$(echo $IMPORT | grep $GALLERIE)" ]&&echo "innerhalb der Gallerie ist kein Import möglich!"&&exit 1

GALLERIE="$GALLERIE/%m.%d_%H.%M.%S_%f.%%e" $IMPORT

!!!
exiftool -P -'Filename<DateTimeOriginal' -d $GALLERIE $IMPORT
!!!

Phil Harvey

Sorry for the delay in responding.  The Make tag is integrated using the string "${make}" on the right hand side of the "<" just as I typed.
...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 ($).