Hi In general if we will get new files always and we need to load latest file.
We need to write script to move existing file to Archive file and then place new fiel in the current load folder:
Lets assume here are the files & folders available in load folder:
so now if we assume we have new file "sample_20180327'.xlsx, in general we will write a script to move existing 'sample_20180326.xlsx' to archive folder and then place the new file 'sample_20180327.xlsx' into load folder
In general we will ask stake holders to do the work manually or we will automate using some script
Use a filelist loop to get all files in the folder and then read the modified date to determine which one you want with load first and order by modified date. This approach does not work if the files are never archived. As the reload will take longer everyday (retrieving the filelist)