Multiple tags for -Directory tree

Started by captured, October 23, 2014, 02:47:10 PM

Previous topic - Next topic

captured

Hi.

System: Debian testing amd64.

Can I use multiple tags to move/copy images into a custom directory tree ?

Tags available; DateTimeOriginal AutoBracketing SequenceNumber FileName

Result desired;

2014-10-28/On/TestDir/1/image01.jpg
2014-10-28/On/TestDir/2/image02.jpg
2014-10-28/On/TestDir/3/image03.jpg


Which is this correct ?

1. $ exiftool -d "%Y-%m-%d" '-Directory<$DateTimeOriginal/%d$AutoBracketing/%d$FileName/%d$SequenceNumber'
2. $ exiftool -d "%Y-%m-%d" '-Directory<%d$DateTimeOriginal/%d$AutoBracketing/%d$SequenceNumber' .
3. $ exiftool -d "%Y-%m-%d" '-Directory<$DateTimeOriginal/$AutoBracketing/$SequenceNumber' .


I'm not sure how to approach the 'TestDir'...
is there a way to use a part of the filesname(s) for Directory names...

e.g.
1st image in the (3) bracket series = image01 (no extension)
'last' image in the series = image03  (no extension)

Substitute 'TestDir' directory above with 'image01_image03'

Thank you.



Phil Harvey

Yes.  You may modify the file name using an advanced formatting expression in braces (ie. ${filename;EXPR}, where EXPR is a Perl expression acting on $_).  See the -p option documentation for more details.

In the format string, %d is the directory of the file, starting from the directory specified on the command line.  You may also take parts of this if you want.  See the -w option for details.

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

captured

Thank you for your help Phil.

Best regards,

[Solved]