Script stopped working in 16.90.0100
Posted: 07 Jun 2016 19:21
Hey everyone
Has there been any recent changes to scripting in today's release XYPlorer 16.90.0100?
I used to run my script happily from the catalog but today after today's upgrade it stopped working. XYPlorer specifically complains about this line where I try to set a variable from a system property with saying it is dubious sintax
Now scripting is admittedly not at all my strong suit, I am more of a copy-paster and this script is most likely anything but optimized and far from the "correct way" of doing things, but it used to work before.
Did something break unintentionally or is it my poor coding skills fault?
----
Offtopic:
It's supposed to be a script to rename Email EML files according to my preferred schema for archiving, as in
Also ideally they would be numbered automatically but I never figured out how to count how many EML files are already in that folder and that is probably not very trivial thing to do anyway.
If anyone care to help out it would be more then welcome.
Has there been any recent changes to scripting in today's release XYPlorer 16.90.0100?
I used to run my script happily from the catalog but today after today's upgrade it stopped working. XYPlorer specifically complains about this line where I try to set a variable from a system property with
Code: Select all
$sentdate = <prop System.Message.DateSent>;Now scripting is admittedly not at all my strong suit, I am more of a copy-paster and this script is most likely anything but optimized and far from the "correct way" of doing things, but it used to work before.
Did something break unintentionally or is it my poor coding skills fault?
----
Offtopic:
It's supposed to be a script to rename Email EML files according to my preferred schema for archiving, as in
Ideally it would batch rename a selection of files but as it stands the variables are set from the first selected file only and applied to all in the selection so it doesn't work for more than one.###_Year_Month_Day_SenderName_Subject
Also ideally they would be numbered automatically but I never figured out how to count how many EML files are already in that folder and that is probably not very trivial thing to do anyway.
If anyone care to help out it would be more then welcome.
Code: Select all
"Rename e-mail"
if (<curext> == "eml") {
$sentdate = <prop System.Message.DateSent>;
$from = <prop System.Message.FromName>;
$subject = <prop DocSubject>;
$sentday = substr (<prop System.Message.DateSent>, 0,2);
$sentmonth = substr (<prop System.Message.DateSent>, 3,2);
$sentyear = substr (<prop System.Message.DateSent>, 6,4);
$assembly = $sentyear._.$sentmonth._.$sentday._.$from._.$subject;
rename b, "<#000>_"."$assembly", , , 4, "_";
rename e, "eml";
}
else {
echo "Selected file is not an email (.EML file format)";
}