Update timestamp from the filename

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Update timestamp from the filename

Postby Maiwand » Thu Aug 07, 2014 3:13 pm

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! :)
Maiwand
 
Posts: 2
Joined: Thu Aug 07, 2014 2:17 pm

Re: Update timestamp from the filename

Postby Stefan » Fri Aug 08, 2014 10:09 pm

 

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





 
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to BRU Support