It would be easy to do this with some python code…
something like the below example would work, then pass the latest file into the openFile()
import glob
import os
list_of_files = glob.glob('/path/to/folder/*') # * means all if need specific format then *.csv
latest_file = max(list_of_files, key=os.path.getctime)
print latest_file