I am trying to create a backup of a file in case I need to resend the document. I am using the following and keep getting "[line: 38] [func: 3 line: 29] IOException: Unable to create the file: E:\Dictaphone\repository\biscom\APOGEE20150601113843273 in <Unknown Source> at line number 38
// create output filename
var filename = messageCache.getValue('Location') + messageCache.getValue('Route') + messageCache.getValue('DOCUMENTID');
var file = new java.io.File(filename);
// write bytes out to file
var out = new java.io.FileOutputStream(file, false);
var bytes = outputStream.toByteArray();
for (var i=0 ; i < bytes.length ; i++) {
out.write(bytes[i]);
}
out.close();
// log file saved
qie.info('saved to ' + filename);
function copy() {
var copyfile, newpath;
copyfile = new qie.ActiveXObject('scripting.FileSystemObject');
copyfile.CopyFile (filename, 'E:\\Dictaphone\\repository\\biscom\\' + messageCache.getValue('Route') + messageCache.getValue('DOCUMENTID'), true);
}