You are not logged in.
Pages: 1
Thank you for this great tool.
I would like to add :EXIF_Date: to file names, however, if the :EXIF_Date: tag is blank or empty then add the :File_DateModified: tag instead. What would be the easiest way to accomplish this?
Thank you
Windows 10 v10.0.18363
ReNamer Lite v7.2
Rule: Insert
Statement1: :EXIF_Date:
Statement2: :File_DateModified:
Last edited by dirbik (2020-11-17 18:53)
Offline
Currently, the only way to apply rules conditionally is to code them up in the Pascal Script rule.
For example, the script below will insert EXIF_Date meta tag if it is not empty, otherwise it will insert File_DateModified meta tag.
var
TagValue: WideString;
begin
TagValue := CalculateMetaTag(FilePath, ':EXIF_Date:');
if Length(TagValue) = 0 then
TagValue := CalculateMetaTag(FilePath, ':File_DateModified:');
if Length(TagValue) > 0 then
FileName := TagValue + WideExtractFileExt(FileName);
end.
Documentation: https://www.den4b.com/wiki/ReNamer:Pascal_Script
Offline
Pages: 1