I need too determine the data source file from a repository in wich there will be many source file with the same filename pattern. The only part of the name wich change is a block with the date yyyymm > fileNamePrefix_yyyymm_fileNameSuffix.ext
I think it could work load the file information with a loop
FOR each File IN filelist '../FOLDER/fileNamePrefix_*_fileNameSuffix.ext'
LOAD FileName('$(File)') as Filename,
FileBasename() as FileBasename,
FileExtension() as FileExtension,
FileDir() as FileDir,
//FilePath() as FilePath,
FileSize('$(File)') as FileSize,
FileTime('$(File)') as FileTime
then I wanted to determine the most recent file with a variable:
SET mySourceFile = MaxString(Filename);
Wich doesn't work... even if I can get the right value of the variable mySourceFile displayed in a text Box.
I guess there is a way to evaluate the variable that I didn't understand... I tried a lot of option but didn't find the solution.