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 tempnodepath = "repository/temps"; var lognodepath = "repository/LOGS"; var lognode = companyhome.childByNamePath(lognodepath); var tempnode = companyhome.childByNamePath(tempnodepath); var errorlog = lognode.childByNamePath("error_log.txt"); if(errorlog == null || errorlog.length = 0){ errorlog = lognode.createFile("error_log.txt"); } // take the filename only, remove the extension var tempfilename = document.properties.name.substring(0,document.properties.name.lastIndexOf(".")); // create the folder var tempfolder = tempnode.createFolder(tempfilename); // import the zip into the newly created "temp" var extractor = actions.create("import"); extractor.parameters.destination = tempfolder.nodeRef; extractor.parameters.encoding = "utf-8"; try{ extractor.execute(document); }catch(exception){ errorlog.content = exception.message + "\r\n"; }