move according to substring of Exif tag

Advanced Renamer forum
#1 : 09/06-19 17:16
Yue Tang
Yue Tang
Posts: 2
I would like to batch move videos into date folders similar to this:
H:\<Year Modified>\<Year Modified>-<Month Modified>-<Day Modified>

But the date will be <ExifTool:MediaCreateDate>. Is this possible? Thanks.



09/06-19 17:16
#2 : 09/06-19 23:25
David Lee
David Lee
Posts: 200
Try this script:

date = app.parseTags("<ExifTool:MediaCreateDate>").match(/(\d{4}).(\d{2}).(\d{2})/);
item.newPath = "H:\\" + date[1] + "\\" + date[1] + "-" + date[2] + "-" + date[3] + "\\";

Tested using <ExifTool:ModifyDate> but hopefully should also work using your Exif flag.

Run it in the normal script method (but without a return statement) and it should set the New Path entry for each video file in the file list, in the format "H:\2018\2018-12-28\". Then run the batch to move the files.


09/06-19 23:25