Forum Discussion

wynandb1's avatar
wynandb1
Contributor
10 years ago
Solved

XML File Comparison

Hi   Can anyone perhaps help me with the following please ?    I want to compare master XML file with newly exported file. The new file name has variables in it. I tried the XML checkpoint and ad...
  • cunderw's avatar
    10 years ago

    Use the aqFileSystem to find the file you're looking for.

     

     

    function Test1() {
    
      var aFile,
          filePath,
          foundFiles;
          
      foundFiles = aqFileSystem.FindFiles("C:\\path\\to\\files\\", "Test_*_*.xml");
      
      if (foundFiles != null) {
          aFile = foundFiles.Next();
          Log.Message(aFile.Name);
      }
      else
        Log.Message("No files were found.");
       
      filePath = "C:\\path\\to\\files\\" + aFile.Name;
      
      Log.Message(filePath);
      
      XML.XmlCheckpoint1.Check(filePath);

    }