Rename into time folders plus aperture or focal length?

Started by Andreas Spindler, December 21, 2013, 08:01:21 PM

Previous topic - Next topic

Andreas Spindler

Hello!

I'd like to (roughly) group panorama and HDR photos by time and aperture, as these photos are shot with equal apertures. For example, I'd like to rename images into a folder like

    2013-12-21/4.0/PC216295.JPG

where 2013-12-21 is DateTimeOriginal and 4.0 is the Aperture value of PC216295.JPG. Is this possible? So far I have...

    exiftool -v0 -r -i -P DCIM -d %Y-%m-%d/%%f_%%-2c.%%le -FileName<$DateTimeOriginal

which creates

    2013-12-21/PC216295.JPG

I had no success by setting the FileName and Directory pseudo-tags using $Aperture in various ways.  :-X
Now its 2 am in the morning and I am stuck. Any help is greatly appreciated!

Andreas

Phil Harvey

Hi Andreas,

Try this:

exiftool -v0 -r -P DCIM -d %Y-%m-%d "-FileName<$DateTimeOriginal/$aperture/%f_%-2c.%le"

Note that I removed the -i option because it didn't have a valid argument.  I am assuming that DCIM is the name of the source directory.

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

Andreas Spindler

#2
Phil, perfect! Works! Actually I don't quite understand why, but I'll figure it out tomorrow.

BTW, I found no examples on the web for this case. Maybe this is a useful for the "Writing File and Directory tags" section in the manual, because aperture and focal-length sub-directories can safe time when grouping panoramas/HDRs.

Thanks for answering so quickly.

Greetings from Santa Cruz de la Palma.  8)

Phil Harvey

The last renaming example in the exiftool application documentation gives a similar command.  Read about the -tagsFromFile option to understand about copying strings with embedded tag values (see the last paragraph).

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