Images conditional renaming

Advanced Renamer forum
#1 : 13/02-19 01:51
M S
M S
Posts: 1
Hello,

could you please help with following question?

I'm trying to create a rule to rename image files, like:

IF <Img Year> is filled:
<Img Year>-<Img Month>-<Img Day>-<Img Hour> <Img Hour>h<Img Min>m<Img Sec>s
Else: Original Filename.

In same folder, i have image files with Img data and others without Img data. If i apply only the above renaming method, the files without Img obviously gets a strange pattern…

Thanks!



13/02-19 01:51
#2 : 13/02-19 10:47
David Lee
David Lee
Posts: 1125
Easy if you use a script. You already have the solution - you just need to convert your pseudo-code to JavaScript:

if (app.parseTags("<Img Year>")){
fName = app.parseTags("<Img Year>-<Img Month>-<Img Day>-<Img Hour> \
<Img Hour>h<Img Min>m<Img Sec>s");
} else {
fName = item.name;
}
return fName;


13/02-19 10:47 - edited 13/02-19 11:22