AnsweredAssumed Answered

Removing files

Question asked by ltardioli on Jun 27, 2012
Latest reply on Jul 2, 2012 by ltardioli
Hello ppl,

I want to write a simple script thats remove all documents thats enter in a folder who doesnt has a extension ".backup".

var name = document.name;
var splited = name.split(".");
var index = splited.length;
if(splited[index -1]!="backup")
{
   document.remove();
}

I created a rule to execute this script but, every document is removed, even those who has the extension .backup.

Any ideas??

Thanks!

Outcomes