Set Language for Folders that are created with -d option

Started by LW81, July 14, 2019, 10:41:49 AM

Previous topic - Next topic

LW81

Hi,

i have a nice photo workflow powered by Exiftool on Windows, where a small script moves Pictures from a Google Drive folder to its target location with a renamed filename etc.

The pattern i use is this one: "Pictures\%%Y\%%y-%%m - %%B\%%Y-%%m-%%d_%%H.%%M.%%S%%%%-c"

So folder for each month is created.

I only have one slight issue with that, which is around the %B pattern.
My Windows laptop is set to English (while i am german), so i want the folders to be created in German.

Example: Instead of a folder called "19-07 - July" the folder should be called "19-07 Juli"

I have tried the -lang otpion, but that seems to have no effect on the folders.

Any help is much appreciated.

Hayo Baan

I think the easiest solution would be to set your machine to German (temporarily); then everything should go automatically. https://www.top-password.com/blog/tag/change-system-locale-windows-command-line/

If that isn't a solution, there are other solutions that could work. The simplest would perhaps just do a regexp replace of the English month names to German.
Hayo Baan – Photography
Web: www.hayobaan.nl

olball

Quote from: LW81 on July 14, 2019, 10:41:49 AM
I only have one slight issue with that, which is around the %B pattern.
My Windows laptop is set to English (while i am german), so i want the folders to be created in German.

Example: Instead of a folder called "19-07 - July" the folder should be called "19-07 Juli"

set the environment variable LC_TIME before running exiftool, e.g. set LC_TIME=German

Just a short test:

>set LC_TIME=English
>exiftool -d %B "-testname<${DateTimeOriginal}" test.JPG
'test.JPG' --> 'May'
    0 image files updated
    1 image files unchanged

>set LC_TIME=German
>exiftool -d %B "-testname<${DateTimeOriginal}" test.JPG
'test.JPG' --> 'Mai'
    0 image files updated
    1 image files unchanged

>set LC_TIME=Italian
>exiftool -d %B "-testname<${DateTimeOriginal}" test.JPG
'test.JPG' --> 'maggio'
    0 image files updated
    1 image files unchanged

Hayo Baan

I thought about that too, but I wasn't  sure that works on Windows too. Glad to see it does :)
Hayo Baan – Photography
Web: www.hayobaan.nl

StarGeek

Quote from: Hayo Baan on July 14, 2019, 12:54:33 PM
I thought about that too, but I wasn't  sure that works on Windows too. Glad to see it does :)

It appears to work on Windows.
* 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).

LW81

Fantastic, it is exactly working as i would hope !

I knew i would find some wizards here !!

Many Thanks