You don't need to use expansions in these expressions, and filename() only works in a LOAD statement. Rather use subfield(), like this:
for each vFoundFile in filelist( Root & '\*.csv')
Let vTemp1 = SubField(vFoundFile, '\', -1); // file name including extension
Let vTemp2 = SubField(SubField(vFoundFile, '\', -1), '.', 1); // file name excluding extension
Ok, but now I get the file name without the extension but with the date stamp.
how can I remove the date stamp?
if I use right function then I get the time stamp.
if I use left function I get partial names because each file has different name.
how can I remove only the date stamp and to get finally this result for the current path: