by Luuk » Fri Jun 02, 2023 5:27 pm
Its unfortunate, but since RegEx(1) can never see a file's metadata, he can only rename like...
DSC_999 -------> DSC_999_RESIZED
DSC_999_1 ----> DSC_999_RESIZED_1
The AutoDate(8) can see metadata, but he will only prefix or suffix this metadata onto the new-names.
The Add(7) can also see metadata, with things like <(metadata)>, but he can only prefix, suffix, or insert.
So the best way will depend on your filenames, and you might also need to conduct more than just 1-rename.
This an example to conduct only the names with having exactly 3-digits in DSC999 for just 1-rename...
First, the Filters(12) needs a checkmark for "RegEx", so then a "Mask" like ^DSC_\d{3}(_\d)?\.jpe?g$
Then clicking the blue-arrows beside "Mask" will present only these names inside of the file-listing.
Then Regex(1) could use a "Match" and "Replace" like...
^(DSC_\d+)((_\d)?)$
\1_RESIZED\2
Add(7) will need an "Insert"==<_($exif:DateTimeOriginal)> with "at"==16.
AutoDate(8) needs "Custom"==%Y%m%d and making sure "Mode"==None.
NOTE: The $ tells Add(7) to use AutoDate(8)'s date-format!
So this method conducts everything in 1-rename, but only conducts names with exactly 3-digits in DSC999.
To conduct names like DSC1234, must edit the "Mask", changing 3-->4 so then clicking the blue-arrows.
Would also need to edit Add(7)'s "at" from 16-->17, since he wont conduct any regex.
Another way: Prefix your dates to all of them in 1-rename, and then let RegEx(1) fix them all with a 2nd-rename.
But of course the "Mask" would need to change, so really it just depends on which method might be the easiest??
This what therube means by saying to maybe post a few diverse actual filenames.