i want to make the filename+spaces=211 characters but the problem is that if the file name characters = 30
i would need 181 spaces
while if file name characters = 80
i would need 131 spaces
i have tried advanced renamer
tags options + spaces .
<Name>
.. and even this script in the scripts section
var maxLength = 25;
var name = item.name;
var date = app.parseTags("<Year Modified><Month Modified><Day Modified>");
var numSpaces = maxLength - name.length - date.length;
var spaces = "";
for (i = 0; i < numSpaces; i++) spaces += " ";
return name + spaces + date;
but it give me this error name is not defined in the line 3
the script that works using advanced Renamer
var maxLength = 222;
var name = item.name;
var date = app.parseTags("<Year Modified><Month Modified><Day Modified>");
var numSpaces = maxLength - name.length - date.length;
var spaces = "";
for (i = 0; i < numSpaces; i++) spaces += " ";
return name + spaces + date;