Rename photos by datetimeoriginal and calculate kids age

Started by aage, April 07, 2014, 03:43:04 PM

Previous topic - Next topic

aage

Hi

I actually works – thanks a lot ;-)

What I have done so far is the following passes and my below question relates to Step 2:

STEP 1: RENAME files

exiftool -config Aage3.config -ext MOD -ext JPG –ext AVI -ext avi -ext MPG -r '-filename<$myfilename%+.4nc.%e' /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

STEP 2: Delete all "old, stupid and un-wanted" XMP-tags

? ? ?

STEP 3: Add XMP-tags to all files

exiftool '-subject<${filename;s/_\d+\..*$//;}' -sep "_" -r /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

STEP 4: Move files to new folder-structure

exiftool -ext AVI -ext JPG '-directory</Users/Aagesen/ExifTool_ExportFile/Billeder_Efter_Dato/$datetimeoriginal/' -d "%Y/%m" -r  /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe


I have been reading about tags and there is apparently A LOT to consider and I am afraid that I will miss something out – so therefor this question:

Before adding my new XMP-tags in Step 3, I would like to ensure that there are no "old, stupid and un-wanted" tags in my files. I would like to write a command that deletes all "old, stupid and un-wanted" tags that are shown in Picasa before I run Step 3. The command should not delete all META-data at all ;-)

So my new command should delete all "old, stupid and un-wanted" tags only leaving me with the following tags in Picasa:

Example-File "Canon_02102011_L4Y2M_J1Y5M_0001.JPG" now have the following tags in Picasa :
L4Y2M
J1Y5M
Canon
02102011

Quistion: What should the command look like and why ?

/Aage

Phil Harvey

Hi Aage,

Read FAQ 2, and for each tag you want to delete, add an option like -xmp:SOMETAG= on the command line.  You can add these argments to the command in step 3, before you set xmp:subject.

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

aage

Hi Phil

Thanks once again !

I have been reading and testing for a while now and underneath I paste the full text from my terminal-window after I have extracted, modified and again extracted data:

Text from my Terminal-window:
--------------------------------------
Aagesens-Mac-mini:~ Aagesen$ exiftool -a -s -g1 /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe_Kopi/vvv0001.JPG
---- ExifTool ----
ExifToolVersion                 : 9.55
---- System ----
FileName                        : vvv0001.JPG
Directory                       : /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe_Kopi
FileSize                        : 8.9 MB
FileModifyDate                  : 2014:07:21 19:06:42+02:00
FileAccessDate                  : 2014:07:21 19:44:56+02:00
FileInodeChangeDate             : 2014:07:21 19:06:44+02:00
FilePermissions                 : rw-r--r--
---- File ----
FileType                        : JPEG
MIMEType                        : image/jpeg
ExifByteOrder                   : Big-endian (Motorola, MM)
CurrentIPTCDigest               : 7a1ec72cd634560df399ee705c9040d1
ImageWidth                      : 5184
ImageHeight                     : 3456
EncodingProcess                 : Baseline DCT, Huffman coding
BitsPerSample                   : 8
ColorComponents                 : 3
YCbCrSubSampling                : YCbCr4:2:2 (2 1)
---- IFD0 ----
Make                            : Canon
Model                           : Canon EOS 600D
Orientation                     : Horizontal (normal)
XResolution                     : 72
YResolution                     : 72
ResolutionUnit                  : inches
Software                        : Picasa
ModifyDate                      : 2014:07:21 19:06:43
Artist                          : Lars Aagesen
YCbCrPositioning                : Co-sited
Copyright                       :
XPKeywords                      : xxx_ccc
Padding                         : (Binary data 2060 bytes, use -b option to extract)
---- ExifIFD ----
ExposureTime                    : 1/200
FNumber                         : 11.0
ExposureProgram                 : Program AE
ISO                             : 400
SensitivityType                 : Recommended Exposure Index
RecommendedExposureIndex        : 400
ExifVersion                     : 0230
DateTimeOriginal                : 2013:05:14 18:46:21
CreateDate                      : 2013:05:14 18:46:21
ComponentsConfiguration         : Y, Cb, Cr, -
ShutterSpeedValue               : 1/197
ApertureValue                   : 11.3
ExposureCompensation            : 0
MeteringMode                    : Multi-segment
Flash                           : On, Fired
FocalLength                     : 84.0 mm
UserComment                     :
SubSecTime                      : 00
SubSecTimeOriginal              : 00
SubSecTimeDigitized             : 00
FlashpixVersion                 : 0100
ColorSpace                      : sRGB
ExifImageWidth                  : 5184
ExifImageHeight                 : 3456
FocalPlaneXResolution           : 5728.176796
FocalPlaneYResolution           : 5808.403361
FocalPlaneResolutionUnit        : inches
CustomRendered                  : Normal
ExposureMode                    : Auto
WhiteBalance                    : Auto
SceneCaptureType                : Standard
ImageUniqueID                   : 753fb024ca396a6febaf53c19f57ac54
OwnerName                       :
SerialNumber                    : 103063016966
LensInfo                        : 18-200mm f/?
LensModel                       : 18-200mm
LensSerialNumber                : 0000000000
Padding                         : (Binary data 2060 bytes, use -b option to extract)
OffsetSchema                    : 4038
---- IFD1 ----
Compression                     : JPEG (old-style)
XResolution                     : 72
YResolution                     : 72
ResolutionUnit                  : inches
ThumbnailOffset                 : 5536
ThumbnailLength                 : 5325
---- XMP-x ----
XMPToolkit                      : XMP Core 5.1.2
---- XMP-xmp ----
Rating                          : 0
ModifyDate                      : 2014:07:21 19:06:43+02:00
---- XMP-microsoft ----
DateAcquired                    : 2013:07:21 05:14:24.055
LastKeywordXMP                  : xxx_ccc
---- XMP-dc ----
Subject                         : tagFRApicasa, xxx_ccc
---- IPTC ----
EnvelopeRecordVersion           : 4
CodedCharacterSet               : UTF8
ApplicationRecordVersion        : 4
Keywords                        : tagFRApicasa, xxx_ccc
---- Photoshop ----
IPTCDigest                      : 7a1ec72cd634560df399ee705c9040d1
---- Composite ----
Aperture                        : 11.0
ImageSize                       : 5184x3456
ScaleFactor35efl                : 1.6
ShutterSpeed                    : 1/200
SubSecCreateDate                : 2013:05:14 18:46:21.00
SubSecDateTimeOriginal          : 2013:05:14 18:46:21.00
SubSecModifyDate                : 2014:07:21 19:06:43.00
ThumbnailImage                  : (Binary data 5325 bytes, use -b option to extract)
CircleOfConfusion               : 0.019 mm
FOV                             : 15.5 deg
FocalLength35efl                : 84.0 mm (35 mm equivalent: 132.1 mm)
HyperfocalDistance              : 33.58 m
LightValue                      : 12.6
Aagesens-Mac-mini:~ Aagesen$ exiftool -xmp:Keywords= -xmp:Subject= -xmp:LastKeywordXMP= -xmp:XPKeywords= /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe_Kopi/vvv0001.JPG
Warning: Tag 'xmp:XPKeywords' does not exist
    1 image files updated
Aagesens-Mac-mini:~ Aagesen$ exiftool -a -s -g1 /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe_Kopi/vvv0001.JPG
---- ExifTool ----
ExifToolVersion                 : 9.55
---- System ----
FileName                        : vvv0001.JPG
Directory                       : /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe_Kopi
FileSize                        : 8.9 MB
FileModifyDate                  : 2014:07:21 19:48:28+02:00
FileAccessDate                  : 2014:07:21 19:48:32+02:00
FileInodeChangeDate             : 2014:07:21 19:48:28+02:00
FilePermissions                 : rw-r--r--
---- File ----
FileType                        : JPEG
MIMEType                        : image/jpeg
ExifByteOrder                   : Big-endian (Motorola, MM)
CurrentIPTCDigest               : 7a1ec72cd634560df399ee705c9040d1
ImageWidth                      : 5184
ImageHeight                     : 3456
EncodingProcess                 : Baseline DCT, Huffman coding
BitsPerSample                   : 8
ColorComponents                 : 3
YCbCrSubSampling                : YCbCr4:2:2 (2 1)
---- IFD0 ----
Make                            : Canon
Model                           : Canon EOS 600D
Orientation                     : Horizontal (normal)
XResolution                     : 72
YResolution                     : 72
ResolutionUnit                  : inches
Software                        : Picasa
ModifyDate                      : 2014:07:21 19:06:43
Artist                          : Lars Aagesen
YCbCrPositioning                : Co-sited
Copyright                       :
XPKeywords                      : xxx_ccc
Padding                         : (Binary data 2060 bytes, use -b option to extract)
---- ExifIFD ----
ExposureTime                    : 1/200
FNumber                         : 11.0
ExposureProgram                 : Program AE
ISO                             : 400
SensitivityType                 : Recommended Exposure Index
RecommendedExposureIndex        : 400
ExifVersion                     : 0230
DateTimeOriginal                : 2013:05:14 18:46:21
CreateDate                      : 2013:05:14 18:46:21
ComponentsConfiguration         : Y, Cb, Cr, -
ShutterSpeedValue               : 1/197
ApertureValue                   : 11.3
ExposureCompensation            : 0
MeteringMode                    : Multi-segment
Flash                           : On, Fired
FocalLength                     : 84.0 mm
UserComment                     :
SubSecTime                      : 00
SubSecTimeOriginal              : 00
SubSecTimeDigitized             : 00
FlashpixVersion                 : 0100
ColorSpace                      : sRGB
ExifImageWidth                  : 5184
ExifImageHeight                 : 3456
FocalPlaneXResolution           : 5728.176796
FocalPlaneYResolution           : 5808.403361
FocalPlaneResolutionUnit        : inches
CustomRendered                  : Normal
ExposureMode                    : Auto
WhiteBalance                    : Auto
SceneCaptureType                : Standard
ImageUniqueID                   : 753fb024ca396a6febaf53c19f57ac54
OwnerName                       :
SerialNumber                    : 103063016966
LensInfo                        : 18-200mm f/?
LensModel                       : 18-200mm
LensSerialNumber                : 0000000000
Padding                         : (Binary data 2060 bytes, use -b option to extract)
OffsetSchema                    : 4038
---- IFD1 ----
Compression                     : JPEG (old-style)
XResolution                     : 72
YResolution                     : 72
ResolutionUnit                  : inches
ThumbnailOffset                 : 5536
ThumbnailLength                 : 5325
---- XMP-x ----
XMPToolkit                      : Image::ExifTool 9.55
---- XMP-microsoft ----
DateAcquired                    : 2013:07:21 05:14:24.055
---- XMP-xmp ----
ModifyDate                      : 2014:07:21 19:06:43+02:00
Rating                          : 0
---- IPTC ----
EnvelopeRecordVersion           : 4
CodedCharacterSet               : UTF8
ApplicationRecordVersion        : 4
Keywords                        : tagFRApicasa, xxx_ccc
---- Photoshop ----
IPTCDigest                      : 7a1ec72cd634560df399ee705c9040d1
---- Composite ----
Aperture                        : 11.0
ImageSize                       : 5184x3456
ScaleFactor35efl                : 1.6
ShutterSpeed                    : 1/200
SubSecCreateDate                : 2013:05:14 18:46:21.00
SubSecDateTimeOriginal          : 2013:05:14 18:46:21.00
SubSecModifyDate                : 2014:07:21 19:06:43.00
ThumbnailImage                  : (Binary data 5325 bytes, use -b option to extract)
CircleOfConfusion               : 0.019 mm
FOV                             : 15.5 deg
FocalLength35efl                : 84.0 mm (35 mm equivalent: 132.1 mm)
HyperfocalDistance              : 33.58 m
LightValue                      : 12.6
Aagesens-Mac-mini:~ Aagesen$
--------------------------------------

Note that I am trying to delete all content from the following Tag-names:

XPKeywords
LastkeywordXMP
Subject
Keywords

Terminal tells me that XPKeywords doest not exist.

Quistion: Why are only content from "Lastkeyword" and "Subject" deleted and what to do for fixing this ?

/Aage


Hayo Baan

You are trying to remove the XMP tags Keywords and XPKeywords. However, these are not XMP tags, they are IPTC and EXIF tags respectively. If you remove the xmp: in front of these two tags, you'll have your result. You can (should?) actually leave xmp: off of all tags; exiftool will sort out what to delete for you, and also take care any duplicates (use -a to view those too).

exiftool -Keywords= -Subject= -LastKeywordXMP= -XPKeywords= /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe_Kopi/vvv0001.JPG

Hope this helps,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

aage

Thank you so very much !

I love EXIF Tool and the support that is provided by all you gifted people  :) :) :)

/Aage

klarakos

We could use FileModifyDate if the other date/time tags aren't available.  I could build this into the config file, but I don't have the time right now.  Give me until tomorrow morning and I'll come up with something for you.

Phil Harvey

You don't need a config file to use FileModifyDate if the other tags aren't available.  Just add another argument before the others on the command line, but using FileModifyDate instead of the other date/time tag(s).

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

aage

Hi again

Before I run the big test on all files I wonder if I should change the way that I do things. This has come to my mind while I was thinking about the trailing number that the configfile adds to all files that are renamed.

This is what I do :

Step 1 : Rename all files
exiftool -config Aage3.config -ext MOD -ext JPG –ext AVI -ext avi -ext MPG -r '-filename<$myfilename%+.4nc.%e' /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

STEP 2: Delete all XMP-tags
exiftool -Keywords= -Subject= -LastKeywordXMP= -XPKeywords= /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

STEP 3: Add XMP-tags to all files
exiftool '-subject<${filename;s/_\d+\..*$//;}' -sep "_" -r /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

STEP 4a: Move all files (JPG+AVI) to new folder-structure
exiftool -ext AVI -ext JPG '-directory</Users/Aagesen/ExifTool_ExportFile/Billeder_Efter_Dato/$datetimeoriginal/' -d "%Y/%m" -r  /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

STEP 4b: Move all files (MOD) to new folder-structure
exiftool -ext MOD '-directory</Users/Aagesen/ExifTool_ExportFile/Billeder_Efter_Dato/$filemodifydate/' -d "%Y/%m" -r  /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

My thouhgt:
Maybe I shold run Step 4a+Step 4b before running Step 1 and add a SORTING command right after Step 4a + Step 4b. The purpose of this new SORTING-Step should be to ensure that the trailing number added to all renamed files by the configfile indicates the correct sort-order. The correct sort-order should be "oldest-to-newest" based on (in this priority) DateTimeOriginal, DateTaken, DateModify.

Quistion 1:
Do you think I should do as described under "My thoughts" ?

Quistion 2:
How should the sorting-command look like to achieve the corret sort-order/adding correct trailing number ?

/Aage

Hayo Baan

Hi Aage,

Sorting your files to get a sequence number that also indicates sort order sounds like a good idea. The command-line option to specify that is -fileOrder, but you probably knew that already ;)

The tough thing would be to get it to use the correct tag as not all files will have e.g., DateTimeOriginal.
To solve this, I suggest to create a new custom field in the .Exiftool_config file.

Something like this:
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Composite' => {
        MySortDate => {
            Desire => {
                0 => 'DateTimeOriginal',
                1 => 'DateTaken',
                2 => 'FileModifyDate',
            },
            ValueConv =>
                '$val[0] || $val[1] || $val[2]',
        },
    },
);


If you use this tag you can combine step 4a and 4b into one as well :)

Note: I have not really tested the code, but it apart from some minor things, it should work.
Hayo Baan – Photography
Web: www.hayobaan.nl

aage

Hi Hayo

Thanks for helping me out and yes, I found the -fileOrder command ;-)

The problem is excatly as you describe and I did not manage to put the code together myself or modify the config-file that Phil made for me. I am not that good at programming ;-)

Just to get this right :

1) Add your code to my config-file.
2) Use the same config-file for both renaming and sorting - but in the renamingstep use var "MyFileName" and in the sortingstep use var "MySortDate"
3) Merge Step4a and Step4b using the var "MySortDate".

Quistion 1) Did I get it right ?
Quistion 2) Can you add your code in my config-file "Aage3.config" (attatched in this post) ?
Quistion 3) How do I run the sorting-step from the config-file ?
Quistion 4) How should a merged Step4a + Step4b look like considering the original code (exiftool -ext AVI -ext JPG '-directory</Users/Aagesen/ExifTool_ExportFile/Billeder_Efter_Dato/$datetimeoriginal/' -d "%Y/%m" -r  /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe) ?

I really appreciate you help ;-)

/Aage

P.S. Very nice pictures on your webpage ! The Industrial heritage section is my favorite with all the "lines" !!

Hayo Baan

Quote from: aage on August 13, 2014, 01:23:22 AM
Thanks for helping me out and yes, I found the -fileOrder command ;-)

You're welcome!

Quote from: aage on August 13, 2014, 01:23:22 AM
The problem is excatly as you describe and I did not manage to put the code together myself or modify the config-file that Phil made for me. I am not that good at programming ;-)

Just to get this right :

1) Add your code to my config-file.
2) Use the same config-file for both renaming and sorting - but in the renamingstep use var "MyFileName" and in the sortingstep use var "MySortDate"
3) Merge Step4a and Step4b using the var "MySortDate".

Quistion 1) Did I get it right ?

Yep!

Quote from: aage on August 13, 2014, 01:23:22 AM
Quistion 2) Can you add your code in my config-file "Aage3.config" (attatched in this post) ?

Yep!

Quote from: aage on August 13, 2014, 01:23:22 AM
Quistion 3) How do I run the sorting-step from the config-file ?
Quistion 4) How should a merged Step4a + Step4b look like considering the original code (exiftool -ext AVI -ext JPG '-directory</Users/Aagesen/ExifTool_ExportFile/Billeder_Efter_Dato/$datetimeoriginal/' -d "%Y/%m" -r  /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe) ?

Like this:

Step 1 : Rename all files
exiftool -config Aage3.config -ext MOD -ext JPG –ext AVI -ext MPG -r -fileOrder MySortName '-filename<$myfilename%+.4nc.%e' /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

STEP 2: Delete all XMP-tags
exiftool -Keywords= -Subject= -LastKeywordXMP= -XPKeywords= /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe
(unchanged)

STEP 3: Add XMP-tags to all files
exiftool '-subject<${filename;s/_\d+\..*$//;}' -sep "_" -r /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe
(unchanged)

STEP 4: Move all files (JPG+AVI+MOD+MPG) to new folder-structure
exiftool -config Aage3.config -ext AVI -ext JPG -ext MOD -ext MPG '-directory</Users/Aagesen/ExifTool_ExportFile/Billeder_Efter_Dato/$MySortDate/' -d "%Y/%m" -r  /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

With the new Aage3.config, this should work:
sub MakeCode($$$)
{
    my @date1 = split /[: ]/, shift;
    my @date2 = split /[: ]/, shift;
    my $name = shift;
    my $years = $date1[0] - $date2[0];
    my $months = $date1[1] - $date2[1];
    my $days = $date1[2] - $date2[2];
    if ($days < 0) { --$months; }
    if ($months < 0) { $months += 12; --$years; }
    my $str = '';
    $str .= "${years}Y" if $years > 0;
    $str .= "${months}M" if $months > 0 and $years >= 0;
    $str = "_$name$str" if $str;
    return $str;
}

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Composite' => {
        MyFileName => {
            Desire => {
                0 => 'Make',
                1 => 'DateTimeOriginal',
                2 => 'CreateDate',
                3 => 'FileModifyDate',
            },
            ValueConv => sub {
                my $vals = shift;
                my $make = $$vals[0];
                my $date = $$vals[1] || $$vals[2] || $$vals[3] or return undef;
                my $daughter = MakeCode($date, '2007:07:27', 'L');
                my $son = MakeCode($date, '2010:04:27', 'J');
                if (defined $make) {
                    $make =~ tr(/\\?*:|"<>\0)()d; # remove illegal characters
                    $make .= '_';
                } else {
                    $make = '';
                }
                my @parts = split /[: ]/, $date;
                return "${make}$parts[2]$parts[1]$parts[0]$daughter$son";
            },
        },
        MySortDate => {
            Desire => {
                0 => 'DateTimeOriginal',
                1 => 'CreateDate',
                2 => 'FileModifyDate',
            },
            ValueConv =>
                '$val[0] || $val[1] || $val[2]',
            PrintConv => '$self->ConvertDateTime($val)',
        },
    },
);
1;  #end


Quote from: aage on August 13, 2014, 01:23:22 AM
P.S. Very nice pictures on your webpage ! The Industrial heritage section is my favorite with all the "lines" !!

Thanks :)
In October (weekend of 11+12 October, I again lead an Industrial Heritage photography workshop in Dortmund, there are still a couple of seats left, so if you want you can join us ;))

Hayo Baan – Photography
Web: www.hayobaan.nl

aage

Hi Hayo

THANK you so much !!!

Your new version of the config-file and the command-lines in each step is just plain "Plug-and-Play" - it worked perfectly ;-) ;-)

Only a small quistion before I run the BIG test ;-)

After sorting and renaming in Step 1 all the files have the correct trailing number - as long as they resides in the original folder.
BUT Step 4 move all files to the new folderstructure.

Because of my original folderstructure I will have files from different "original folders" added to the new folderstructure and the trailing number will no longer be a trailing number in the new folder - because files from same day could come from different "original folders" ;-)

Quistion 1) Can I run Step 1 in a modyfied way as a final Step 5 to ensure correct trailing number in the new folderstructure ?
Quistion 2) How should the modyfied commandline look like for "Step 5 : Correct trailing number for all files in new folderstructure" ?

/Aage

P.S. The Industrial Heritage photography workshop in Dortmund sounds cool - but I will be driving around in a Polish wood in my old Land Rover in this period ;-) Thanks for the invite anyway ;-)

Hayo Baan

Quote from: aage on August 13, 2014, 03:23:45 PM
Hi Hayo

THANK you so much !!!

Your new version of the config-file and the command-lines in each step is just plain "Plug-and-Play" - it worked perfectly ;-) ;-)

Excellent! Good to hear (I did test the individual components, but couldn't test the whole, of course).

Quote from: aage on August 13, 2014, 03:23:45 PM
Only a small quistion before I run the BIG test ;-)

After sorting and renaming in Step 1 all the files have the correct trailing number - as long as they resides in the original folder.
BUT Step 4 move all files to the new folderstructure.

Because of my original folderstructure I will have files from different "original folders" added to the new folderstructure and the trailing number will no longer be a trailing number in the new folder - because files from same day could come from different "original folders" ;-)

Quistion 1) Can I run Step 1 in a modyfied way as a final Step 5 to ensure correct trailing number in the new folderstructure ?
Quistion 2) How should the modyfied commandline look like for "Step 5 : Correct trailing number for all files in new folderstructure" ?

Right, so basically what you want is to have the files in each directory with their own sequence. Then, why don't we just skip the first step and do it at the end. You'll have to adjust step 3 for this though.

exiftool -config Aage3.config '-subject<${myfilename;s/\..*$//;}' -sep "_" -r /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

Step 5 would then basically the same as the first step (we don't perform any more) but then called on each of the new dated directories individually.

By the way I noticed I made a mistake in step one, I used -fileOrder MySortName, but it should have been -fileOrder MySortDate, of course.

Quote from: aage on August 13, 2014, 03:23:45 PM
P.S. The Industrial Heritage photography workshop in Dortmund sounds cool - but I will be driving around in a Polish wood in my old Land Rover in this period ;-) Thanks for the invite anyway ;-)
That also sounds great! Have fun :)
Hayo Baan – Photography
Web: www.hayobaan.nl

aage

Hi Hayo (and other readers)

I am now testing the order of steps and it look quite good - but i discovered a strange thing:

When Picasa reads info in the picture "Canon_02102011_L4Y2M_J1Y5M_0001.JPG" - Picasa tells me that the TAG "Billeder_tømt_24122011" exist in this picture.

But I can´t find this TAG using ExifTool like this:

----------------------------------------------------------
exiftool -a -s -g1 /Users/Aagesen/ExifTool_ExportFile/Filer_til_ExifTEST/2_Aug2011_Dec2011/Canon_02102011_L4Y2M_J1Y5M_0001.JPG
---- ExifTool ----
ExifToolVersion                 : 9.55
---- System ----
FileName                        : Canon_02102011_L4Y2M_J1Y5M_0001.JPG
Directory                       : /Users/Aagesen/ExifTool_ExportFile/Filer_til_ExifTEST/2_Aug2011_Dec2011
FileSize                        : 3.0 MB
FileModifyDate                  : 2014:08:20 20:34:05+02:00
FileAccessDate                  : 2014:08:20 21:56:05+02:00
FileInodeChangeDate             : 2014:08:20 20:34:05+02:00
FilePermissions                 : rw-rw-rw-
---- File ----
FileType                        : JPEG
MIMEType                        : image/jpeg
ExifByteOrder                   : Big-endian (Motorola, MM)
ImageWidth                      : 3888
ImageHeight                     : 2592
EncodingProcess                 : Baseline DCT, Huffman coding
BitsPerSample                   : 8
ColorComponents                 : 3
YCbCrSubSampling                : YCbCr4:2:2 (2 1)
---- IFD0 ----
Make                            : Canon
Model                           : Canon EOS 400D DIGITAL
Orientation                     : Horizontal (normal)
XResolution                     : 72
YResolution                     : 72
ResolutionUnit                  : inches
ModifyDate                      : 2011:10:02 08:47:39
YCbCrPositioning                : Co-sited
Padding                         : (Binary data 2060 bytes, use -b option to extract)
---- ExifIFD ----
ExposureTime                    : 1/60
FNumber                         : 5.0
ExposureProgram                 : Program AE
ISO                             : 400
ExifVersion                     : 0221
DateTimeOriginal                : 2011:10:02 08:47:39
CreateDate                      : 2011:10:02 08:47:39
ComponentsConfiguration         : Y, Cb, Cr, -
ShutterSpeedValue               : 1/60
ApertureValue                   : 5.0
ExposureCompensation            : 0
MeteringMode                    : Multi-segment
Flash                           : Auto, Fired, Red-eye reduction
FocalLength                     : 50.0 mm
UserComment                     :
FlashpixVersion                 : 0100
ColorSpace                      : sRGB
ExifImageWidth                  : 3888
ExifImageHeight                 : 2592
FocalPlaneXResolution           : 4433.295325
FocalPlaneYResolution           : 4453.608247
FocalPlaneResolutionUnit        : inches
CustomRendered                  : Normal
ExposureMode                    : Auto
WhiteBalance                    : Auto
SceneCaptureType                : Standard
Padding                         : (Binary data 2060 bytes, use -b option to extract)
OffsetSchema                    : 4160
---- Canon ----
MacroMode                       : Normal
SelfTimer                       : Off
Quality                         : Fine
CanonFlashMode                  : Red-eye reduction (Auto)
ContinuousDrive                 : Single
FocusMode                       : AI Focus AF
RecordMode                      : JPEG
CanonImageSize                  : Large
EasyMode                        : Full auto
DigitalZoom                     : None
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : +3
MeteringMode                    : Evaluative
FocusRange                      : Not Known
CanonExposureMode               : Easy
LensType                        : Canon EF 35-350mm f/3.5-5.6L or Sigma or Tamron Lens
MaxFocalLength                  : 200 mm
MinFocalLength                  : 18 mm
FocalUnits                      : 1/mm
MaxAperture                     : 4
MinAperture                     : 27
FlashActivity                   : 0
FlashBits                       : E-TTL, Built-in
FocusContinuous                 : Single
ZoomSourceWidth                 : 0
ZoomTargetWidth                 : 0
PhotoEffect                     : Off
ManualFlashOutput               : n/a
ColorTone                       : Normal
FocalType                       : Zoom
FocalLength                     : 50 mm
FocalPlaneXSize                 : 23.04 mm
FocalPlaneYSize                 : 15.37 mm
AutoISO                         : 100
BaseISO                         : 400
MeasuredEV                      : 8.62
TargetAperture                  : 5
TargetExposureTime              : 1/64
ExposureCompensation            : 0
WhiteBalance                    : Auto
SlowShutter                     : None
SequenceNumber                  : 0
OpticalZoomCode                 : n/a
CameraTemperature               : 25 C
FlashExposureComp               : 0
AutoExposureBracketing          : Off
AEBBracketValue                 : 0
ControlMode                     : Camera Local Control
FNumber                         : 5
ExposureTime                    : 1/64
MeasuredEV2                     : 8.625
BulbDuration                    : 0
CameraType                      : EOS Mid-range
AutoRotate                      : None
NDFilter                        : n/a
SelfTimer2                      : 0
CanonImageType                  : Canon EOS 400D DIGITAL
CanonFirmwareVersion            : Firmware 1.1.0
OwnerName                       : unknown
SerialNumber                    : 1430801993
CanonModelID                    : EOS Digital Rebel XTi / 400D / Kiss Digital X
NumAFPoints                     : 9
ValidAFPoints                   : 9
CanonImageWidth                 : 3888
CanonImageHeight                : 2592
AFImageWidth                    : 3504
AFImageHeight                   : 2336
AFAreaWidth                     : 78
AFAreaHeight                    : 78
AFAreaXPositions                : 8 -555 571 -931 8 947 -555 571 8
AFAreaYPositions                : 504 270 270 4 4 4 -262 -262 -496
AFPointsInFocus                 : 1,3,4
ThumbnailImageValidArea         : 0 159 7 112
SerialNumberFormat              : Format 2
OriginalDecisionDataOffset      : 0
FileNumber                      : 159-9501
BracketMode                     : Off
BracketValue                    : 0
BracketShotNumber               : 0
LongExposureNoiseReduction2     : Off
WBBracketMode                   : Off
WBBracketValueAB                : 0
WBBracketValueGM                : 0
FilterEffect                    : None
ToningEffect                    : None
LensModel                       :
InternalSerialNumber            : H2110372
DustRemovalData                 : (Binary data 1024 bytes, use -b option to extract)
CropLeftMargin                  : 0
CropRightMargin                 : 0
CropTopMargin                   : 0
CropBottomMargin                : 0
ToneCurve                       : Standard
Sharpness                       : 3
SharpnessFrequency              : n/a
SensorRedLevel                  : 0
SensorBlueLevel                 : 0
WhiteBalanceRed                 : 0
WhiteBalanceBlue                : 0
ColorTemperature                : 5200
PictureStyle                    : Standard
DigitalGain                     : 0
WBShiftAB                       : 0
WBShiftGM                       : 0
MeasuredRGGB                    : 833 1024 1024 594
ColorSpace                      : sRGB
VRDOffset                       : 0
SensorWidth                     : 3948
SensorHeight                    : 2622
SensorLeftBorder                : 52
SensorTopBorder                 : 23
SensorRightBorder               : 3939
SensorBottomBorder              : 2614
BlackMaskLeftBorder             : 0
BlackMaskTopBorder              : 0
BlackMaskRightBorder            : 0
BlackMaskBottomBorder           : 0
ColorDataVersion                : 1 (1DmkIIN/5D/30D/400D)
WB_RGGBLevelsAsShot             : 2171 1024 1024 1608
ColorTempAsShot                 : 4921
WB_RGGBLevelsAuto               : 2171 1024 1024 1608
ColorTempAuto                   : 4921
WB_RGGBLevelsMeasured           : 2165 1024 1021 1604
ColorTempMeasured               : 4921
WB_RGGBLevelsDaylight           : 2245 1024 1024 1533
ColorTempDaylight               : 5200
WB_RGGBLevelsShade              : 2655 1024 1024 1282
ColorTempShade                  : 7000
WB_RGGBLevelsCloudy             : 2456 1024 1024 1394
ColorTempCloudy                 : 6000
WB_RGGBLevelsTungsten           : 1553 1070 1070 2494
ColorTempTungsten               : 3200
WB_RGGBLevelsFluorescent        : 1856 1024 1024 2118
ColorTempFluorescent            : 3769
WB_RGGBLevelsKelvin             : 2245 1024 1024 1533
ColorTempKelvin                 : 5210
WB_RGGBLevelsFlash              : 2717 1024 1024 1274
ColorTempFlash                  : 7199
WB_RGGBLevelsPC1                : 8191 1024 1024 8191
ColorTempPC1                    : 4533
WB_RGGBLevelsPC2                : 8191 1024 1024 8191
ColorTempPC2                    : 4533
WB_RGGBLevelsPC3                : 8191 1024 1024 8191
ColorTempPC3                    : 4533
WB_RGGBLevelsCustom             : 2245 1024 1024 1533
ColorTempCustom                 : 5210
PerChannelBlackLevel            : 256 256 256 255
FlashOutput                     : 14%
FlashBatteryLevel               : 5.40V
MeasuredRGGBData                : 29556 36721 36872 21226
CustomPictureStyleFileName      :
---- CanonCustom ----
SetButtonCrossKeysFunc          : Set: Picture Style
LongExposureNoiseReduction      : Off
FlashSyncSpeedAv                : Auto
Shutter-AELock                  : AF/AE lock
AFAssistBeam                    : Emits
ExposureLevelIncrements         : 1/3 Stop
MirrorLockup                    : Disable
ETTLII                          : Evaluative
ShutterCurtainSync              : 1st-curtain sync
MagnifiedView                   : Image playback only
LCDDisplayAtPowerOn             : Display
---- InteropIFD ----
InteropVersion                  : 0100
---- IFD1 ----
Compression                     : JPEG (old-style)
XResolution                     : 72
YResolution                     : 72
ResolutionUnit                  : inches
ThumbnailOffset                 : 10054
ThumbnailLength                 : 4060
---- XMP-x ----
XMPToolkit                      : Image::ExifTool 9.55
---- XMP-rdf ----
About                           : uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b
---- XMP-microsoft ----
DateAcquired                    : 2011:12:24 14:40:53.804
---- Composite ----
Aperture                        : 5.0
ConditionalFEC                  : 0
DriveMode                       : Single-frame Shooting
FlashType                       : Built-In Flash
ISO                             : 400
ImageSize                       : 3888x2592
Lens                            : 18.0 - 200.0 mm
LensID                          : Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro Model A14
RedEyeReduction                 : Off
ScaleFactor35efl                : 1.6
ShootingMode                    : Full auto
ShutterCurtainHack              : 1st-curtain sync
ShutterSpeed                    : 1/60
ThumbnailImage                  : (Binary data 4060 bytes, use -b option to extract)
WB_RGGBLevels                   : 2171 1024 1024 1608
BlueBalance                     : 1.570313
CircleOfConfusion               : 0.019 mm
FOV                             : 25.1 deg
FocalLength35efl                : 50.0 mm (35 mm equivalent: 80.9 mm)
HyperfocalDistance              : 26.93 m
Lens35efl                       : 18.0 - 200.0 mm (35 mm equivalent: 29.1 - 323.7 mm)
LightValue                      : 8.6
RedBalance                      : 2.120117
Aagesens-Mac-mini:~ Aagesen$
-----------------------------------------------------

Do you know how I should find this particular TAG and how I can delete the TAG in my Step 2?

STEP 2: Delete all XMP-tags
exiftool -Keywords= -Subject= -LastKeywordXMP= -XPKeywords= /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe


Kind regards
/Aage
...and still working

aage

Hi

Ignore my last post - nothing wrong with my metadata. It´s a BUG in PICASA and I found a work-around ;-)

/Aage