altus_nel
11 years agoContributor
Hi there,
Not sure why you need a new feature for this? You can try using aqFile.Move().
We keep the log file as is and then simply export it to a central location like this for example:
var outFileName;
var filename = aqConvert.DateTimeToFormatStr(aqDateTime.Now(),"%Y%m%d_%H%M");
Log.Event("Converting output to mht...");
outFileName = Project.ConfigPath + "Log\\" + filename + ".mht";
Log.Message(outFileName);
Log.SaveResultsAs(outFileName, 2); //converts output to mht
if(aqFile.Exists("q:\\automation\\run_output\\" + filename + ".mht")){
aqFile.Delete("q:\\automation\\run_output\\" + filename + ".mht");
}
//Copy the file elsewhere
if(aqFile.Move(outFileName, "q:\\automation\\run_output\\" + filename + ".mht")){
Log.Message("File moved");
} else {
Log.Warning("File was not moved!");
}
Hope this helps somewhat