ExifTool Forum

ExifTool => Newbies => Topic started by: captured on October 23, 2014, 02:47:10 PM

Title: Multiple tags for -Directory tree
Post by: captured on October 23, 2014, 02:47:10 PM
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.


Title: Re: Multiple tags for -Directory tree
Post by: Phil Harvey on October 23, 2014, 02:54:11 PM
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.

Title: Re: Multiple tags for -Directory tree
Post by: captured on October 23, 2014, 03:06:10 PM
Thank you for your help Phil.

Best regards,

[Solved]