As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
var stagingFolder = companyhome.childByNamePath("Intranet/Marketing Communications/Website Documents/Staging"); var productionFolder = companyhome.childByNamePath("Intranet/Marketing Communications/Website Documents/Production"); if(stagingFolder != null) { var i=0; var today = new Date(); stagingChildren = stagingFolder.children; stagingTotal = stagingChildren.length; for(i=0; i<stagingTotal;i++) { child = stagingChildren[i]; if(child.properties["cm:from"] <= today) { child.move(productionFolder); } } }
p.s. try to replace the blanks in your childbynamepath with "_x0020_"e.g.:var stagingFolder = companyhome.childByNamePath("Intranet/Marketing_x0020_Communications/Website_x0020_Documents/Staging");