Find filenames that can be converted to e.g. FileModifyDate

Started by baumaeschi, March 24, 2023, 12:09:01 PM

Previous topic - Next topic

baumaeschi

Hi
I'm looking for a exiftool command line that goes recursively through all my jpg files and outputs a csv file with all files that have

a) No DateTimeOriginal Tag
b) Their filename can be converted to a correct Time Tag (e.g. DateTimeOriginal, FileModifyDate, etc.)

The csv file should show the filenames+path, DateTimeOriginal, FileModifyDate.

Especially for b) above I didn't find the correct -IF statement (something like -if "Filname is convertible to Timestamp" then -DateTimeOriginal -FileModifyDate)

Thanks for your suggestions!

Phil Harvey

exiftool -p "$filepath,$datetimeoriginal,$filemodifydate" -m -r -ext jpg -if "not $datetimeoriginal or $filename =~ /\d{4}(.*?\d{2}){5}/" DIR

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

baumaeschi

Hi Phil

Thank you so much for your "formula". I must admit that I don't understand what it should do (especially the part ($filename =~ /\d{4}(.*?\d{2}){5}/).

When I apply this command to my directory FotMaSu, the output is as follows:
exiftool -p "$filepath,$datetimeoriginal,$filemodifydate" -m -r -ext jpg -if "not $datetimeoriginal or $filename =~ /\d{4}(.*?\d{2}){5}/" FotMaSu
  133 directories scanned
 5169 files failed condition
    0 image files read

In order to explain better what I want to do, I attache here the csv output of the following command:
exiftool -DateTimeOriginal -FileModifyDate -ifd0:Model -FileCreateDate FotMaSu -charset cp850 -ext jpg -r -csv > exiftool_tags_output.csv

After line 3732 the photos don't have a 'DateTimeOriginal', so your "formula" should output lines 3732-3882, omit 3883-3885, include 3887-8986, omit lines 3987 and following, etc.

What I actually want to do, is to find photos where the "Filename embedded date" differs more than eg. 5h from the 'FileModifyDate'. But this might be too complex since my filenames often have a title followed by the date, so the date is embedded "somewhere" in the filename (not at the beginning, not at the end!)

But if your "formula" would find the photos with a) no DateTimeOriginal and b) an embedded date in the Filename this would be a great help for me. Then I could compare the two dates visually in an Excel table.

Phil Harvey

What o/s and shell are you using?

The "formula" I gave tests to see if the filename has a 4-digit number followed by at least 5 2-digit numbers -- this would be interpreted as a date/time value.

I suspect the problem is a quoting issue because of the shell you are using.

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

baumaeschi

Hi Phil
I'm using Windows 10 for managing my photos.

- Martin

Phil Harvey

Hi Martin,

But what shell?  PowerShell or cmd shell?  My command should work for the cmd shell in Windows, but you'll have to change the quotes for PowerShell.

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

baumaeschi

Hi Phil

Sorry for not coming back to this thread for so long time.
Thanks to your question I know now that command shell and PowerShell are different things  ;)
And yes, your initially given formula is doing the job perfectly in the cmd shell.

I use PowerShell because I usually go to a specific folder by right-clicking a folder on Windows GUI and then selecting 'open in terminal'.
In order to use PowerShell I had to replace the " by '. I finally ended up at the following PowerShell command line:
exiftool -p '$filepath,$datetimeoriginal,$filemodifydate' -m -r -ext jpg -if '$filename =~ /\d{4}(.*?\d{2}){2}/' FotMaSu > out.csv

The Output of the above command line is:
  133 directories scanned
 2599 files failed condition
 2570 image files read

The file output.csv is very close to what I would like to have. But I'm still looking for some minor modifications in the output.

Question 1:
Is it possible to have an additional row between $filepath,$datetimeoriginal,row,$filemodifydate representing the output of exiftool "-datetimeoriginal<filename"?
But, no change of metadata in the files should be done. Only write the conversion of the filename to a date to the new row.

Question 2:
Is it possible to have tab characters between the rows instead of commas?

Question 3:
The above output of the command
2599 files failed condition stated that 2599 files were not written to out.txt. Is there a way to have a look at the files that failed the condition?

- Martin

Phil Harvey

Hi Martin,

The answer is yes to all your questions.  Here is the command to do it:

exiftool -efile2 failed.txt -p '$filepath $datetimeoriginal ${filename;$_=$self->InverseDateTime($_)} $filemodifydate' -m -r -ext jpg -if '$filename =~ /\d{4}(.*?\d{2}){2}/' FotMaSu > out.csv
- 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 ($).

baumaeschi

Hi Phil

Great!! Again, I don't understand at all what this one is doing "${filename;$_=$self->InverseDateTime($_)}" But it works :o

But now I have another problem. A lot of lines in out.csv have empty pathnames (see below).
But I thought the command line should list only files that have a filename with four digits followed by at least two groups of two digits.

Command line:
exiftool -efile2 failed.txt -p '$filepath,$datetimeoriginal,${filename;$_=$self->InverseDateTime($_)},$filemodifydate' -m -r -ext jpg -if '$filename =~ /\d{4}(.*?\d{2}){2}/' FotMaSu > out.csv

Output in out.csv:
Wanted to attach out.csv, but it seems to be too big with 437 KB
Therefore just add a cut-out of it (showing some empty lines after lines WITH pathnames)

cut-out of out.csv
,2022:12:20 15:15:52,2022:12:20 15:15:52,2022:12:20 15:15:54+01:00
,2022:12:20 15:16:18,2022:12:20 15:16:18,2022:12:20 15:16:20+01:00
,2022:12:20 15:16:47,2022:12:20 15:16:47,2022:12:20 15:16:50+01:00
,2022:12:20 15:18:37,2022:12:20 15:18:37,2022:12:20 15:18:40+01:00
,2022:12:20 15:19:05,2022:12:20 15:19:04,2022:12:20 15:19:06+01:00
,2022:12:20 15:19:26,2022:12:20 15:19:25,2022:12:20 15:19:28+01:00
,2022:12:20 15:41:32,2022:12:20 15:41:32,2022:12:20 15:41:32+01:00
,2022:12:20 15:41:54,2022:12:20 15:41:53,2022:12:20 15:41:54+01:00
,2022:12:20 15:42:39,2022:12:20 15:42:39,2022:12:20 15:42:42+01:00
,2022:12:20 15:42:47,2022:12:20 15:42:47,2022:12:20 15:42:48+01:00
,2022:12:20 15:43:30,2022:12:20 15:43:30,2022:12:20 15:43:32+01:00
,2022:12:20 15:43:39,2022:12:20 15:43:39,2022:12:20 15:43:42+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/20221211_134404.jpg,2022:12:11 13:44:04,2022:12:11 13:44:04,2022:12:11 13:44:04+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/20221211_134635.jpg,2022:12:11 13:46:35,2022:12:11 13:46:35,2022:12:11 13:46:36+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221217-WA0001.jpg,,2022:12:17 00:01:00,2022:12:17 18:42:38+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221217-WA0002.jpg,2022:12:17 18:43:42,2022:12:17 00:02:00,2023:03:28 09:14:45+02:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221217-WA0003.jpg,,2022:12:17 00:03:00,2022:12:17 19:03:20+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221217-WA0005.jpg,,2022:12:17 00:05:00,2022:12:17 19:04:24+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221217-WA0006.jpg,,2022:12:17 00:06:00,2022:12:17 22:19:08+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221226-WA0000.jpg,,2022:12:26 00:00:00,2022:12:26 12:46:10+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221226-WA0001.jpg,,2022:12:26 00:01:00,2022:12:26 12:47:56+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221226-WA0002.jpg,,2022:12:26 00:02:00,2022:12:26 12:46:40+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221226-WA0003.jpg,,2022:12:26 00:03:00,2022:12:26 12:47:06+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221226-WA0004.jpg,,2022:12:26 00:04:00,2022:12:26 12:47:20+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221226-WA0005.jpg,,2022:12:26 00:05:00,2022:12:26 12:47:52+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221229-WA0000.jpg,,2022:12:29 00:00:00,2022:12:29 09:11:30+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221229-WA0001.jpg,,2022:12:29 00:01:00,2022:12:29 09:11:32+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221229-WA0002.jpg,,2022:12:29 00:02:00,2022:12:29 09:11:32+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221229-WA0003.jpg,,2022:12:29 00:03:00,2022:12:29 09:11:34+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221229-WA0004.jpg,,2022:12:29 00:04:00,2022:12:29 09:11:34+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221229-WA0005.jpg,,2022:12:29 00:05:00,2022:12:29 09:11:34+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221229-WA0006.jpg,,2022:12:29 00:06:00,2022:12:29 09:11:36+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20221230-WA0008.jpg,2022:12:30 10:53:36,2022:12:30 00:08:00,2023:03:28 09:14:45+02:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20230106-WA0001.jpg,,2023:01:06 00:01:00,2023:01:06 15:09:20+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20230106-WA0002.jpg,,2023:01:06 00:02:00,2023:01:06 15:11:16+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20230106-WA0003.jpg,,2023:01:06 00:03:00,2023:01:06 15:11:36+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20230107-WA0001.jpg,,2023:01:07 00:01:00,2023:01:07 13:47:04+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Familie 2022/IMG-20230107-WA0002.jpg,,2023:01:07 00:02:00,2023:01:07 13:47:56+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Inkwilersee 2022/20230102_154503.jpg,2023:01:02 15:45:03,2023:01:02 15:45:03,2023:01:02 15:45:06+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Inkwilersee 2022/20230102_154604.jpg,2023:01:02 15:46:04,2023:01:02 15:46:04,2023:01:02 15:46:08+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Mollis 2022/20221217_111856.jpg,2022:12:17 11:18:57,2022:12:17 11:18:56,2022:12:17 11:18:58+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Mollis 2022/20221217_111902.jpg,2022:12:17 11:19:02,2022:12:17 11:19:02,2022:12:17 11:19:02+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Nichtkategorisiert 2022/20230107_162051.jpg,2023:01:07 16:20:52,2023:01:07 16:20:51,2023:01:07 16:20:54+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Nichtkategorisiert 2022/f0482b66002b434e8d03c321d1149caa.jpg,2022:12:14 01:51:46,,2023:03:28 09:14:45+02:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Nichtkategorisiert 2022/IMG-20221218-WA0001.jpg,2022:12:18 14:53:22,2022:12:18 00:01:00,2023:03:28 09:14:45+02:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Nichtkategorisiert 2022/IMG-20221225-WA0002.jpg,2022:12:25 13:27:20,2022:12:25 00:02:00,2023:03:28 09:14:45+02:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Nichtkategorisiert 2022/IMG-20230101-WA0001.jpg,,2023:01:01 00:01:00,2023:01:01 09:35:54+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Nichtkategorisiert 2022/Screenshot_20230106_180837_Chrome.jpg,2023:01:06 18:08:37,2023:01:06 18:08:37,2023:01:06 18:08:38+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Nichtkategorisiert 2022/Screenshot_20230106_180858_Chrome.jpg,2023:01:06 18:08:58,2023:01:06 18:08:58,2023:01:06 18:09:00+01:00
C:/Users/aesch/Desktop/FotoSamples/FotMaSu/FotMar/2022/Nichtkategorisiert 2022/signal-2022-11-24-11-51-35-675.jpg,,2022:11:24 11:51:35,2023:01:06 18:44:24+01:00
,2019:03:08 15:48:27,2019:03:08 15:48:27,2019:03:08 15:48:28+01:00
,2019:03:08 15:48:39,2019:03:08 15:48:39,2019:03:08 15:48:40+01:00
,2019:03:08 15:48:46,2019:03:08 15:48:46,2019:03:08 15:48:46+01:00
,2019:03:08 15:48:51,2019:03:08 15:48:51,2019:03:08 15:48:52+01:00
,2019:03:08 15:50:55,2019:03:08 15:50:55,2019:03:08 15:50:56+01:00
,2019:03:08 15:51:55,2019:03:08 15:51:55,2019:03:08 15:51:56+01:00
,2019:03:08 15:52:01,2019:03:08 15:52:01,2019:03:08 15:52:02+01:00
,2019:03:08 15:52:05,2019:03:08 15:52:05,2019:03:08 15:52:06+01:00
,2019:03:08 15:52:08,2019:03:08 15:52:08,2019:03:08 15:52:08+01:00
,2019:03:08 15:52:11,2019:03:08 15:52:11,2019:03:08 15:52:12+01:00
,2019:03:08 15:52:14,2019:03:08 15:52:14,2019:03:08 15:52:14+01:00
,2019:09:30 13:27:35,2019:09:30 13:27:35,2019:09:30 13:27:36+02:00
,2019:09:30 13:27:38,2019:09:30 13:27:38,2019:09:30 13:27:38+02:00
,2019:09:30 13:27:44,2019:09:30 13:27:44,2019:09:30 13:27:44+02:00
,2019:09:30 15:06:49,2019:09:30 15:06:49,2019:09:30 15:06:50+02:00
,2019:09:30 15:06:54,2019:09:30 15:06:54,2019:09:30 15:06:54+02:00
,2019:09:30 15:06:55,2019:09:30 15:06:55,2019:09:30 15:06:56+02:00
,2019:10:02 19:55:18,2019:10:02 19:55:18,2019:10:02 19:55:18+02:00
,2019:10:02 19:55:28,2019:10:02 19:55:28,2019:10:02 19:55:28+02:00
,2019:10:02 19:55:40,2019:10:02 19:55:40,2019:10:02 19:55:40+02:00
,2019:10:02 19:55:53,2019:10:02 19:55:53,2019:10:02 19:55:54+02:00
,2019:10:03 09:58:37,2019:10:03 09:58:37,2019:10:03 09:58:38+02:00
,2019:10:03 09:58:49,2019:10:03 09:58:49,2019:10:03 09:58:50+02:00
,2019:10:03 13:39:16,2019:10:03 13:39:16,2019:10:03 13:39:16+02:00
,2019:10:03 13:39:24,2019:10:03 13:39:24,2019:10:03 13:39:24+02:00
,2019:10:03 15:50:43,2019:10:03 15:50:43,2019:10:03 15:50:44+02:00
,2019:10:03 17:15:22,2019:10:03 17:15:22,2020:01:02 08:29:08+01:00
,2019:10:03 17:15:23,2019:10:03 17:15:23,2020:01:02 08:28:54+01:00
,2019:10:03 21:07:46,2019:10:03 21:07:46,2019:10:03 21:07:46+02:00
,2019:10:03 21:07:56,2019:10:03 21:07:56,2019:10:03 21:07:56+02:00
,2019:10:03 21:07:59,2019:10:03 21:07:59,2019:10:03 21:08:00+02:00
,2019:10:06 09:52:13,2019:10:06 09:52:13,2019:10:06 09:52:14+02:00
,2019:10:06 09:52:22,2019:10:06 09:52:22,2019:10:06 09:52:22+02:00
,2019:10:06 09:52:33,2019:10:06 09:52:33,2019:10:06 09:52:34+02:00
,2019:10:06 09:52:37,2019:10:06 09:52:37,2019:10:06 09:52:38+02:00
,2019:10:06 09:52:42,2019:10:06 09:52:42,2019:10:06 09:52:42+02:00
,2019:10:06 10:00:30,2019:10:06 10:00:30,2019:10:06 10:00:30+02:00
,2019:10:06 10:00:47,2019:10:06 10:00:47,2019:10:06 10:00:48+02:00
,2019:10:06 10:02:44,2019:10:06 10:02:44,2019:10:06 10:02:44+02:00
,2019:10:06 10:02:48,2019:10:06 10:02:48,2019:10:06 10:02:48+02:00
,2019:10:06 10:03:05,2019:10:06 10:03:05,2019:10:06 10:03:06+02:00
,2019:10:06 10:03:07,2019:10:06 10:03:07,2019:10:06 10:03:08+02:00
,2019:10:06 10:03:08,2019:10:06 10:03:08,2019:10:06 10:03:08+02:00
,2019:10:06 12:05:27,2019:10:06 12:05:27,2019:10:06 12:05:28+02:00
,2019:10:06 12:05:32,2019:10:06 12:05:32,2019:10:06 12:05:32+02:00
,2019:10:06 12:05:37,2019:10:06 12:05:37,2019:10:06 12:05:38+02:00
,2019:10:06 12:05:48,2019:10:06 12:05:48,2019:10:06 12:05:48+02:00
Do you have any idea what these "pathless" lines in out.csv could be?

- Martin




Phil Harvey

Hi Martin,

Do those missing entries perhaps contain special characters in their file names?  Try using $directory/$filename instead of $filepath

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

baumaeschi

Hi Phil

Yes, it seems you are right. The output is quite different when using $directory/$filename instead of $filepath

Cut-out of the new out.csv
FotMaSu/FotMar/2020/Aare 2020/Aare 2020-10-21_16-10-51_DYNF4467.JPG,2020:10:21 16:10:51,2020:10:21 16:10:51,2020:10:21 16:10:52+02:00
FotMaSu/FotMar/2020/Aare 2020/Aare 2020-10-21_16-12-26_QSYK1910.JPG,2020:10:21 16:12:26,2020:10:21 16:12:26,2020:10:21 16:12:26+02:00
FotMaSu/FotMar/2020/Burgäschisee 2020/Burgäschisee 2020-01-12_17-15-57_IMG_0139.JPG,2020:01:12 17:15:57,2020:01:12 17:15:57,2020:01:12 17:15:58+01:00
FotMaSu/FotMar/2020/Burgäschisee 2020/Burgäschisee 2020-01-12_17-16-14_IMG_0140.JPG,2020:01:12 17:16:14,2020:01:12 17:16:14,2020:01:12 17:16:14+01:00
FotMaSu/FotMar/2020/Burgäschisee 2020/Burgäschisee 2020-01-12_17-16-35_IMG_0141.JPG,2020:01:12 17:16:35,2020:01:12 17:16:35,2020:01:12 17:16:36+01:00
FotMaSu/FotMar/2020/Burgäschisee 2020/Burgäschisee 2020-01-12_17-16-39_IMG_0142.JPG,2020:01:12 17:16:39,2020:01:12 17:16:39,2020:01:12 17:16:40+01:00
FotMaSu/FotMar/2020/Burgäschisee 2020/Burgäschisee 2020-01-12_17-17-04_IMG_0143.JPG,2020:01:12 17:17:04,2020:01:12 17:17:04,2020:01:12 17:17:04+01:00
FotMaSu/FotMar/2020/Burgäschisee 2020/Burgäschisee 2020-01-12_17-17-11_IMG_0144.JPG,2020:01:12 17:17:11,2020:01:12 17:17:11,2020:01:12 17:17:12+01:00
FotMaSu/FotMar/2020/Burgäschisee 2020/Burgäschisee 2020-01-12_17-17-54_IMG_0145.JPG,2020:01:12 17:17:54,2020:01:12 17:17:54,2020:01:12 17:17:54+01:00
FotMaSu/FotMar/2020/Burgäschisee 2020/Burgäschisee 2020-01-12_17-18-09_IMG_0146.JPG,2020:01:12 17:18:09,2020:01:12 17:18:09,2020:01:12 17:18:10+01:00
..
..
FotMaSu/FotMar/2020/Ferien Velo Inn 2020/Ferien Velo Inn 2020-07-13_17-52-58_IMG_1454.JPG,2020:07:13 17:52:58,2020:07:13 17:52:58,2020:07:13 17:52:58+02:00
FotMaSu/FotMar/2020/Ferien Velo Inn 2020/Ferien Velo Inn 2020-07-13_17-53-17_IMG_1455.JPG,2020:07:13 17:53:17,2020:07:13 17:53:17,2020:07:13 17:53:18+02:00
FotMaSu/FotMar/2020/Ferien Velo Inn 2020/Ferien Velo Inn 2020-07-13_17-53-26_IMG_1456.JPG,2020:07:13 17:53:26,2020:07:13 17:53:26,2020:07:13 17:53:26+02:00
FotMaSu/FotMar/2020/Ferien Velo Inn 2020/Ferien Velo Inn 2020-07-13_17-53-45_IMG_1457.JPG,2020:07:13 17:53:45,2020:07:13 17:53:45,2020:07:13 17:53:46+02:00
FotMaSu/FotMar/2020/Ferien Velo Inn 2020/Ferien Velo Inn 2020-07-14_10-14-01_IMG_1038.JPG,2020:07:14 10:14:01,2020:07:14 10:14:01,2020:07:14 10:14:02+02:00
FotMaSu/FotMar/2020/Frühling Burgäschisee 2020/Frühling Burgäschisee 2020-03-19_10-26-16_IMG_1375.JPG,2020:03:19 10:26:16,2020:03:19 10:26:16,2020:03:19 10:26:16+01:00
FotMaSu/FotMar/2020/Frühling Burgäschisee 2020/Frühling Burgäschisee 2020-03-19_10-27-11_IMG_1376.JPG,2020:03:19 10:27:11,2020:03:19 10:27:11,2020:03:19 10:27:12+01:00
FotMaSu/FotMar/2020/Frühling Burgäschisee 2020/Frühling Burgäschisee 2020-03-19_10-37-51_IMG_1379.JPG,2020:03:19 10:37:51,2020:03:19 10:37:51,2020:03:19 10:37:52+01:00
FotMaSu/FotMar/2020/Frühling Burgäschisee 2020/Frühling Burgäschisee 2020-03-19_10-41-02_IMG_1380.JPG,2020:03:19 10:41:02,2020:03:19 10:41:02,2020:03:19 10:41:02+01:00
FotMaSu/FotMar/2020/Frühling Burgäschisee 2020/Frühling Burgäschisee 2020-03-19_11-12-31_IMG_1381.JPG,2020:03:19 11:12:31,2020:03:19 11:12:31,2020:03:19 11:12:32+01:00
FotMaSu/FotMar/2020/Frühling Burgäschisee 2020/Frühling Burgäschisee 2020-03-19_11-13-37_IMG_1382.JPG,2020:03:19 11:13:37,2020:03:19 11:13:37,2020:03:19 11:13:38+01:00

So - this problem is related with my other thread: csv as an Input to exiftool

Unfortunately, it's not really an option to omit special characters in my path- and filenames, because there are too many of them.

Is there really no way to make ExifTool handle the special characters correctly?

So one question is how to modify the output, so that special characters like ä,Ä,ö,ü,Ü are displayed correctly in the file out.csv, and the order question would be (see my other tread) how a csv must be loaded into the database so that special characters match.

Any hints for that? E.g. -charset cp850 option or similar?

- Martin

Phil Harvey

Hi Martin,

Quote from: baumaeschi on April 03, 2023, 04:24:46 AMIs there really no way to make ExifTool handle the special characters correctly?

I have wasted far too much time on this Windows problem already.  There are no easy solutions.

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

StarGeek

Quote from: baumaeschi on April 03, 2023, 04:24:46 AMIs there really no way to make ExifTool handle the special characters correctly?

I use this StackOverflow answer.

There can be side effects, especially in the fonts and spacing in GUIs of older programs.  You'll have to decide for yourself if it affects your workflow.

The worse problem I had was with the GUI for my scanner.  I finally said to heck with it and bought VueScan.  So much better of an interface.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

baumaeschi

Hi Phil and StarGeek

Thank you for your answers! Obviously, I have to accept that handling special characters on Windows is very difficult.

Does this also mean, in contrast to Windows, foreign languages like French, German, Spanish, Swedish, etc. are not a problem for exiftool on other operating systems like e.g. Linux?

However, thank you very much, Phil, for all the hints and command line options you've provided to me. I'd never found out this just by googling.  With this knowledge, I'll find a way to edit my photo's metadata as I'd like to.

- Martin

Phil Harvey

Hi Martin,

Quote from: baumaeschi on April 07, 2023, 04:10:44 AMDoes this also mean, in contrast to Windows, foreign languages like French, German, Spanish, Swedish, etc. are not a problem for exiftool on other operating systems like e.g. Linux?

Correct.  Filenames with special characters are handled properly by the standard C I/O library functions on all operating systems except Windows.  Perl uses the standard C I/O functions.  I have spent some time patching ExifTool to call some of the Windows-specific routines to provide partial support, but providing full support would be a lot more work.

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