ExifTool Forum

ExifTool => Newbies => Topic started by: richo on October 29, 2020, 01:34:46 PM

Title: Time in FileModifyDate is set to zero on Linux
Post by: richo on October 29, 2020, 01:34:46 PM
Hello,
I am sort of recreative user of exiftool. Mainly for renaming my files and setting some meta data.I am using Windows version of following command for importing my images from SD card to my computer (after backup of sd card). All is fine on windows, but in recent time I am using more Linux. I tried to make version which will work in Linux, but setting -FileModifyDate from DateTimeOriginal is setting time part to 00:00:00

This command is rather long it is doing few things:

Here is the command line:


exiftool -config my-fuji-exif-config.txt -progress -o /tmp -r -d img-import/%Y/%Y-%m-%d/%Y-%m-%d '-filename<${datetimeoriginal}-${MyShutterCount}.%le' '-XMP-xmpMM:PreservedFileName<${filename;s/\.[^.]*$//}' '-FileModifyDate<DateTimeOriginal'  -ext RAF /sdcard/DCIM


When I do that all is fine only the time in filemod is zerod:

rw-r--r-- 1 richo richo 35410640 2020-10-24 00:00:00.000000000 +0200 2020-10-24-000001.raf

when i then run on new created file simple command:

exiftool  '-FileModifyDate<DateTimeOriginal' 2020-10-24-000001.raf

all is well and set:

-rw-r--r-- 1 richo richo 35410640 2020-10-24 07:59:40.000000000 +0200 2020-10-24-000001.raf

Thank you for pointing where is my mistake. Just to be sure I am attaching my config file.

Title: Re: Time in FileModifyDate is set to zero on Linux
Post by: Phil Harvey on October 29, 2020, 01:46:11 PM
Hi Richo,

Quote from: richo on October 29, 2020, 01:34:46 PM

exiftool -config my-fuji-exif-config.txt -progress -o /tmp -r -d img-import/%Y/%Y-%m-%d/%Y-%m-%d '-filename<${datetimeoriginal}-${MyShutterCount}.%le' '-XMP-xmpMM:PreservedFileName<${filename;s/\.[^.]*$//}' '-FileModifyDate<DateTimeOriginal'  -ext RAF /sdcard/DCIM

The problem is that the -d option also applies to the copied DateTimeOriginal value.  To disable the print formatting when copying DateTimeOriginal, do this: '-FileModifyDate<DateTimeOriginal#' (ie. add '#' to the tag name).

- Phil
Title: Re: Time in FileModifyDate is set to zero on Linux
Post by: richo on October 29, 2020, 03:06:28 PM
Phil,
thank you very much. It is working now as expected.
-r-