Page 1 of 1

Update timestamp from the filename

PostPosted: Thu Aug 07, 2014 3:13 pm
by Maiwand
SORRY, I POSTED THIS IN GENERAL FORUM BY MISTAKE.

I know BRU has an option to change the file time stamp properties by going to Options > Time stamp.

However, I need to update the time stamp according to the file name, not just one specific time.

Example: http://i.imgur.com/cJpAP5D.png - Need to get the red info into the green!

Any help will be VERY much appreciated!

If I cannot do this with BRU, suggestions for any other GUI apps would be great.

Thank you so much for this wonderful little program that has saved me countless hours in the past! :)

Re: Update timestamp from the filename

PostPosted: Fri Aug 08, 2014 10:09 pm
by Stefan
 

You can use exif command line tool like http://www.sno.phy.queensu.ca/~phil/exiftool/

Something like:

Code: Select all
@ECHO OFF
REM http://www.sno.phy.queensu.ca/~phil/exiftool/
REM set EXIF date from file names like
REM 19600121234125.jpg or 19951015211623.jpg
REM (Jahr/Monat/Tag/Stunde/Minute/Sekunde)

SET  name=%~1
SET  base=%~n1
SET  year=%base:~0,4%
SET month=%base:~4,2%
SET   day=%base:~6,2%
SET  hour=%base:~8,2%
SET   min=%base:~10,2%
SET   sec=%base:~12,2%

SET stamp=%year%:%month%:%day% %hour%:%min%:%sec%

echo Processing "%name%" "%stamp%"

REM exiftool -DateTimeOriginal="%stamp%" "%name%"

    exiftool -AllDates="%stamp%" "%name%"

PAUSE