Hi @pmscorca Here is another implementation using greater. Expression in If-condition:
@greater(int(split(replace(replace(item().name,'.csv',''),'.',''),'_')[1]),int(variables('tmpfile')))
tmpfile :: string variable, with default value 20230101 If the if condition succeeds, then we have two set variable activities First set variable assigns the new greater value to tmpfile variable
@greater(int(split(replace(replace(item().name,'.csv',''),'.',''),'_')[1]),int(variables('tmpfile')))
Second set variable assigns proper file name to another string variable, fullfilename
@item().name
Make sure to run foreach sequentially! Please let us know how it goes. Thank you!