#1 : 26/04-20 18:04 Joe
Posts: 4
|
Hi , i saw a previoius form post on this, and wondered if it had been added as a feature - or if there is a workaround without using scripting? https://www.advancedrenamer.com/forum_thread?for um_id=3208
I want to use <ExifTool:DateTimeOriginal> to rename my files and then sort them into directories based on Yr/Mon, but a lot of my 20,000 images dont have this data populated. In this case my best alternative would be DateModified, but i dont know how to easily set this up? Looked like Ken had the idea how to do this, but not yet implemented? Thanks for any advice - J |
#2 : 27/04-20 11:40 David Lee
Posts: 1125
|
A simple workaround is to rename your files with the ExifTool tag and then add a Replace method using Date/Time Modified tags to timestamp the files where ExifTool data was not available.
If your new filenames will contain only the date/time then all you need to do in the second step is search for a null filename - eg... Replace: ^$ With: <Year Modified>_<Month Modified>_<Day Modified> <Hour Modified>_<Min Modified>_<Sec Modified> Use regular expressions It will be slightly more complicated - but still straightforward - if the new filenames will contain other information Note: the regex "^$" searches for <start-of-string> followed immediately by <end-of-string> - ie a null string. |
#3 : 27/04-20 18:57 Joe
Posts: 4
|
Reply to #2:
David, firstly a big Thank You! for taking the time and effort to respond to me. I noticed that you had tried to help a lot of people with questions on the forum, not all of whom seem to appreciate it! :) OK, also like a number of other people, your suggestions put me on the right path and I now have a solution! When a file doesnt have an exif DateTaken, the filename becomes "separator + incremental number" because i am using a Collision Rule. So i end up with files called -001.jpg , -002, etc. I need to use the Collision Rule in case there are duplicate files , which i know there are [will remove them later using Duplicate Cleaner or WinMerge ]. So, once i had understood the Basic Principle of AR - that the 'Method list' runs sequentially to the end before 'outputing' the change, i worked out a solution. Method 1. NewName <ExifTool:DateTimeOriginal>£<Inc Nr:1>£ This creates the filename based on Datetaken and then adds £01£ , £02£, etc to the end of the filename. Where there is NO exif DateTaken, the filename is £03£, etc. So, then I use a modification of your suggestion, and i do this Method 2. Replace Txt to be replaced: ^£\d+£ Replace with: <Year Modified>_<Month Modified>_<Day Modified>_<Hour Modified>_<Min Modified>_<Sec Modified> Use regular expressions This finds all the files with no DateTaken and renames them with the Date Modified. Now i need to get rid of the £01£ etc from the files that did have anb exif DateTaken, so i add Method 3. Replace Txt to be replaced: £\d£ Replace with: Use Regular expressions This gets rid of the unique £number£ in the filenames - and the beauty is that I have left Collision Rule working (with Hyphen separator and Number), so removing the unique £number£ is not a problem. My duplicates just get -001, -002, etc added to the filenames. Have yet to try on a big batch, but with a number of use cases, it looks to work perfectly! Again, thanks for your help David. {dont know how to add screen shots easily.} |