Hi
Objective - Rename files that are not folders with the "Date Modified" as the prefix to the file.
Current rule setup
Rule 1 - If Kind is Folder then Run rules on Folder content
Rule 2
If Kind is not Folder then Rename with pattern <date> <filename>.<extension>
Problem
FIrst time the renaming happens its fine, but the after second modification of the file, the first modified date is part of the file name. So file name ends up as <Date 2><Date1> <filename>.<extension>.
What I want to achieve
Check if the filename's first 10 chars(YYYY-MM-DD) is Date Modified.
If Date Modified matches then Do Nothing
If Date Modified does not match, check the first 10 chars form a date (not sure what is the elegant way to do this)
If first 10 chars are date, truncate the current date and rename with Date modified prefix.
If first 10 chars are NOT date, just prefix the with Date modified prefix.