01-19-2012 07:54 AM
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";
}
01-19-2012 10:19 AM
01-20-2012 04:46 AM
01-20-2012 05:10 AM
08-16-2015 12:57 PM
08-17-2015 04:12 AM
08-17-2015 07:13 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.