How to put directory name in event tag ?

Started by ArtNonoBstant, December 24, 2010, 07:56:22 AM

Previous topic - Next topic

ArtNonoBstant

Hello Phil

I am a new user of exiftool, and it look like very good as log.
It is a little bit difficult for me to use because of my english, but I will sucess.

I hope you can help me about my little problem. In fact it is not a problem, just I'm trying to found the way to range my photos, apply licence ...
After take photo from SD card, I put them in folder which the name is the event, like "FĂȘte de la musique", "Anniversaire" (Music party, birthday in english ;) )...
After that I range them with this command :
exiftool -r -P -ext .jpg -d "%Y/%A %d %B - %%d/%.2nc.%%e" "-filename<datetimeoriginal" -o *

Like that, I have folders with, Y/Date - Event/nameoffile.ext

But, I would like to define "original name of directory" (which is %%d) as event, and put this event in name file.
But, this is not working :
exiftool -event=%%d *.jpg

Is there an another way to do that ?
I can enter the information for each photo, but I have some old photos of different events, and I want to automatise the update of the event tag.

I also want to put the event in the file name, using $event because %%d don't work with the command I wrote up.

Did U understand what I want (because I am not sure of my english).
If you understood, is there a solution of my problem doctor Phil ?
Thank U

Phil Harvey

To copy Directory to the Event tag, use "-event<directory".

I hope this helps because I'm not sure exactly what you are trying to do.

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

ArtNonoBstant

Thank U Phil that what I was waiting for :D

But know, there is something I don't understand yet. What is the difference between this three commands :
-event=directory
-event<directory
-event>directory

??

-----------

Other question :
I want to put the event in the namefile with :
exiftool '-filename<$Event_%.2nc_$Copyright.%e' XXX.jpg

Output :
Warning: [minor] Tag 'Event_' not defined - XX.jpg

This command work with a space after Event, like that :
exiftool '-filename<$Event _%.2nc_$Copyright.%e' XXX.jpg
But have filename with space can be a problem on Windaube (daube means shit in french & "au" is the same sound of o. Windows = Windaube for Unix User).

If there is no way, I will use 2 commands :
exiftool '-filename<_%.2nc_$Copyright.%e' XXX.jpg
exiftool '-filename<$Event%f.%e' XXX.jpg



Thank for help.

Phil Harvey

-event=directory  writes the string "directory" to the Event tag

-event<directory copies the value of the Directory tag to Event

-event>directory copies the value of the Event tag to Directory

QuoteOther question :
I want to put the event in the namefile with :
exiftool '-filename<$Event_%.2nc_$Copyright.%e' XXX.jpg

Output :
Warning: [minor] Tag 'Event_' not defined - XX.jpg

Right.  This is because the underline ("_") is valid in a tag name.  So you must use braces to isolate the tag name:

exiftool '-filename<${Event}_%.2nc_$Copyright.%e' XXX.jpg

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

ArtNonoBstant