Move pics and movies to directory with DateTimeOriginal

Advanced Renamer forum
#1 : 06/02-23 22:49
Dave Franks
Dave Franks
Posts: 5
I have a directory with pics and videos. I would like the output filename and path to reflect the date/time they were taken (not creation date of the file).

If I have IMG_1234.JPG and MVI_5678.MP4 I would like them copied/renamed to:


I got the name to change with:
NEW NAME <ExifTool:DateTimeOriginal> <name>.<Ext>
REPLACE space with _

I have not figured out how to change the output folder using DateTimeOrig. I can only change it to the file date which is not what I need. I can put <ExifTool:DateTimeOriginal> in the output path but the format is "YYYY_MM_DD HH_MM_SS". How do I get the path to be z:\Pictures\YYYY\MM\DD? I really want to be able to edit the path similar to the way I edit the name.

06/02-23 22:49
#2 : 07/02-23 09:42
David Lee
David Lee
Posts: 1125
Use a Script method with Batch Mode: Rename and specify item.newPath in the script.

date = app.parseTags("<ExifTool:DateTimeOriginal>").split(/[_ ]/);
Y = date[0];
M = date[1];
D = date[2];
h = date[3];
m = date[4];
s = date[5];
item.newPath = "Z:\\Pictures\\" + Y + "\\" + M + "\\" + D;
return Y + M + D + "_" + h + m + s + "_" +;

07/02-23 09:42