Solved
Forum Discussion
Hi Luukdb!
Interesting, probably something simple like a missing '\'. Would you mind sharing your new code that presents this error?
In the screenshot I only had one \ and tried \\ in my current code but that didn't do anything.
aqFile.Copy("\\bs-international.nl\\group\\ICT\\Applicatiebeheer\\TestComplete\\NewPackingTable xml files\\NewPackingTable_BIT-ERP_Order.xml", "\\bs-international.nl\\group\\ICT\\Applicatiebeheer\\TestComplete\\NewPackingTable xml files\\NewPackingTable_BIT-ERP_Order-copy.xml");
function RenameXMLFile()
{
var timeNowRaw = aqDateTime.Now()
var timeNowFormatted = aqConvert.DateTimeToFormatStr(timeNowRaw,"%m%d%Y_%H%M")
Log.Message("Unformatted raw date from aqDateTime.Now = " + aqDateTime.Now())
Log.Message("Formatted Date = " + aqConvert.DateTimeToFormatStr(timeNowRaw, "%m%d%Y_%H%M"))
var OldPath = "\\bs-international.nl\\group\\ICT\\Applicatiebeheer\\TestComplete\\NewPackingTable xml files\\NewPackingTable_BIT-ERP_Order-copy.xml";
var NewPath = "\\bs-international.nl\\group\\ICT\\Applicatiebeheer\\TestComplete\\NewPackingTable xml files\\NewPackingTable_BIT-ERP_Order- "+ timeNowFormatted + ".xml";
// Renames the file
aqFileSystem.RenameFile(OldPath, NewPath);
}