Hi Jim, Thanks. that fixed the problem. However, it take too much time when a folder has too many files to go through. Below are the new steps I have so next time when I just want to pull the latest files, it don't take the long time like using the date/time as filter (above). I 'm not sure if it is an effective way to do it. Is there any better way to just extract latest files with shorter time?
1) the first time get the whole filelist in the defined folder (Files In Directory(dir)). Saved it into a column of a table, "T1" (only run one time)
2) after sometime, latest files added to the same folder. script will go to the same folder and take the whole filelist as "newlist" (newlist = Files In Directory(dir)).
3) get column in table 1) as list, then loop through to remove the elements out from newlist (I use Remove From ()) .
4) do whatever needed on newlist.
5) append newlist into table in 1).
6) repeat step 2)-5) next time when I need to get latest files again.
Any suggestion?