Date Script

Advanced Renamer forum
#1 : 10/01-23 19:53
Steve Schneider
Steve Schneider
Posts: 1
I'm organizing a photo library (about 45,000 images) my first pass at renaming gave good results with <Img Year>-<Img Month>-<Img Day>-<RSubstr:1:8>, but there were more files that had been renamed manually or resized so rather than getting something like 2022-01-30-IMG_5678.jpg, I get ----abcdefgh.jpg. All these files appear to have last modified dates so I would like to have a script that uses the modified date if the create date does not exist. It would be really cool if the script could also modify the tag so the <Img Year>-<Img Month>-<Img Day> are reset to the modified date values.


10/01-23 19:53
#2 : 11/01-23 11:16
David Lee
David Lee
Posts: 1125
Use a Script method and use Date Modified tags if <Img Year> returns a null string:

if (app.parseTags('<Img Year>')) {
return app.parseTags('<Img Year>-<Img Month>-<Img Day>-<RSubstr:1:8>');
} else {
return app.parseTags('<Year Modified>-<Month Modified>-<Day Modified>-<RSubstr:1:8>');
}

Advanced Renamer can only read image metadata so you cannot write to Img date tags.


11/01-23 11:16 - edited 11/01-23 11:19