You can use first a FOR EACH file IN filelist ... NEXT loop and a string function to extract the date, then take the highest value from the list, then load the file. I'm thinking something along the lines of KeepChar(Mid(filenamehere, 1, Index(filenamehere, '_', -1)), '0123456789') Then LOAD Max(Value) AS FileToLoad RESIDENT ListOfFiles; LET vFileToLoad = FieldValue('FileToLoad', 1); LatestReport: LOAD * FROM $(vFileToLoad);