ExifTool Forum

ExifTool => Newbies => Topic started by: Stelton on August 01, 2016, 04:33:12 AM

Title: First letter in month capital
Post by: Stelton on August 01, 2016, 04:33:12 AM
Hi,

I use this job:
exiftool "-Directory<DateTimeOriginal" -d "%Y/%m - %B/%Y-%#m-%d" c:/media/ingest/

The directory with the month name give this ect.:

"07 - july"

What I want is:

"07 - July"

The first letter schould be capatilize.

How to do that?
Title: Re: First letter in month capital
Post by: Hayo Baan on August 01, 2016, 06:27:34 AM
Strange, for me the month comes out with a capital like it should. The format is dictated by you language settings, so perhaps those are wrong? (Note: I think instead of %#m you mean %m)

If that doesn't fix it, you can use the following to make the first character of the month a capital:
-p '${DateTimeOriginal;s/- (.)/- \u$1/;}' -d '%Y/%m - %B/%Y-%m-%d'

Hope that helps,
Hayo
Title: Re: First letter in month capital
Post by: Stelton on August 01, 2016, 01:43:01 PM
Thank you Hayo,

I have tried and can see it change, but how to combine your code:

-p '${DateTimeOriginal;s/- (.)/- \u$1/;}' -d '%Y/%m - %B/%Y-%m-%d'

with this:

exiftool "-Directory<DateTimeOriginal" -d "%Y/%m - %B/%Y-%m-%d" c:/media/ingest/

Sorry to ask, but I'm completely newbie...

Thanks in advance.



Title: Re: First letter in month capital
Post by: Hayo Baan on August 01, 2016, 02:03:07 PM
Oops, sorry I should have also show the command to use:
exiftool -Directory'<${DateTimeOriginal;s/- (.)/- \u$1/;}' -d '%Y/%m - %B/%Y-%m-%d' c:/media/ingest/
If you're on windows, change the single quotes to double quotes.
Title: Re: First letter in month capital
Post by: Stelton on August 01, 2016, 05:39:07 PM
exiftool  "-Directory<${DateTimeOriginal;s/- (.)/- \u$1/;}" -d "%Y/%m - %B/%Y-%m-%d" c:/media/ingest/

This code Works.

Thank you for your help.
Title: Re: First letter in month capital
Post by: Stelton on August 02, 2016, 01:50:07 AM
Sorry but I still have a minior problem.

I run Thisted CODE Inside a scheduled batchjob om a Windows 2012 server:

D:
CD D:\Grafik\Deploy_Images\Images\

REM Change filename
exiftool -ext jpg "-FileName<${CreateDate;}" -d "WP_%Y-%m-%d_%H-%M-%S.jpg"  D:/Faelles/Faelles_filer/OneDrive_MAB\Billeder/Filmrulle/

REM Change filetime
exiftool "-filemodifydate<${datetimeoriginal;}" D:/Faelles/Faelles_filer/OneDrive_MAB\Billeder/Filmrulle/

REM Create direktorats and move
exiftool  "-Directory<${DateTimeOriginal;s/- (.)/- \u$1/;}" -d "%Y/%m - %B/%Y-%m-%d" D:/Faelles/Faelles_filer/OneDrive_MAB\Billeder/Filmrulle/

But the only it does is moving the files to this directory named:
"m - Y-d"

Why this behavior? Is there a problem to run Exiftool Inside a scheduled batchjob?
Title: Re: First letter in month capital
Post by: Hayo Baan on August 02, 2016, 02:16:26 AM
In Windows batch files all % should be replaced by two %% (yes, very annoying, but that's just how it has been since the old DOS days so I guess that's why MS can't fix this).
Title: Re: First letter in month capital
Post by: Stelton on August 02, 2016, 02:33:54 AM
Thank you Hayo, now it Works  :)