8 Replies Latest reply: Jun 20, 2016 1:10 PM by oliver clements RSS

    Last row of text from 1000 files

    oliver clements

      I have a directory where 1000s of text files are saved. I am trying to create a table that shows the file names and the last row of text from each file. I have currently created a process that can do this by looping though each and every file but this is a slow process.


      FOR Each vXML IN FileList ('Directory\*.xml')




        FirstSortedValue([@1:30],-RowNo()) AS TEXT,

        FileName() AS FILE

      FROM [$(vXML)] (fix, codepage is 1252);


      NEXT vXML;

      EXIT Script;


      Does anyone have suggestions for a more efficient method?