NisHera
11 years agoValued Contributor
Copy file in unknown sub directory
How can i copy file in known directory un- known sub directory eg my application generate xml file. It is placed in spool directory and sub derectory with random name like C:\Spool\78283...
- 11 years agoYou can use aqFileSystem.FindFiles to find the file by its partial path, and then copy the found file.
//JScript
var foundFiles = aqFileSystem.FindFiles("C:\\Spool", "*.xml", true /* search subfolders */);
if (foundFiles != null)
{
foundFiles(0).Copy("C:\\myfolder\\New.XML", true);
}
else
{
Log.Error("File not found");
}