Moving Files to folder based on Date
This renames files and moves them to the folder based on the date. What happens if there is already a file in that folder with that specific name?
if (app.parseTags('<ExifTool:DateTimeOriginal>')) {
returnStr = app.parseTags('<ExifTool:DateTimeOriginal>');
year = returnStr.substr(0, 4);
month = returnStr.substr(5, 2);
day = returnStr.substr(8, 2);
hour = returnStr.substr(11, 2);
minute = returnStr.substr(14, 2);
second = returnStr.substr(17, 2);
} else if (app.parseTags('<ExifTool:FileCreateDate>')) {
returnStr = app.parseTags('<ExifTool:FileCreateDate>');
year = returnStr.substr(0, 4);
month = returnStr.substr(5, 2);
day = returnStr.substr(8, 2);
hour = returnStr.substr(11, 2);
minute = returnStr.substr(14, 2);
second = returnStr.substr(17, 2);
} else {
returnStr = "";
}
item.newPath = "C:\\_PHOTOS\\" + year + "\\" + month;
item.newName = year + month + day + "_" + hour + minute + second;
return item.newName;
if (app.parseTags('<ExifTool:DateTimeOriginal>')) {
returnStr = app.parseTags('<ExifTool:DateTimeOriginal>');
year = returnStr.substr(0, 4);
month = returnStr.substr(5, 2);
day = returnStr.substr(8, 2);
hour = returnStr.substr(11, 2);
minute = returnStr.substr(14, 2);
second = returnStr.substr(17, 2);
} else if (app.parseTags('<ExifTool:FileCreateDate>')) {
returnStr = app.parseTags('<ExifTool:FileCreateDate>');
year = returnStr.substr(0, 4);
month = returnStr.substr(5, 2);
day = returnStr.substr(8, 2);
hour = returnStr.substr(11, 2);
minute = returnStr.substr(14, 2);
second = returnStr.substr(17, 2);
} else {
returnStr = "";
}
item.newPath = "C:\\_PHOTOS\\" + year + "\\" + month;
item.newName = year + month + day + "_" + hour + minute + second;
return item.newName;
Is there a way to not move it if there is already one there named the same?
Reply to #2:
Hi Nikki
I'm not a programmer so my answer may be useless, but if you right click on a file and select "Remove special ---> Remove erroneous items" you can avoid moving files with the same name.
You can also use the "Name collision rule" .
Regards
Miguel
Hi Nikki
I'm not a programmer so my answer may be useless, but if you right click on a file and select "Remove special ---> Remove erroneous items" you can avoid moving files with the same name.
You can also use the "Name collision rule" .
Regards
Miguel
Reply to #3:
Since the previous thread, https://www.advancedrenamer.com/forum_thread?forum_id=14903 I've been working on some way to accomplish that very action. Unfortunately, if there is a way to do it, it has escaped me and my meager scripting skills. I thought maybe the item.errorlevel / item.errorcode might be useful, but apparently that only effects the "current" or original directory.
If anybody out there has any thoughts on this I'd love to hear them; until then, I can't offer any help.
Best,
DF
Since the previous thread, https://www.advancedrenamer.com/forum_thread?forum_id=14903 I've been working on some way to accomplish that very action. Unfortunately, if there is a way to do it, it has escaped me and my meager scripting skills. I thought maybe the item.errorlevel / item.errorcode might be useful, but apparently that only effects the "current" or original directory.
If anybody out there has any thoughts on this I'd love to hear them; until then, I can't offer any help.
Best,
DF