Hi,
I have a program that outputs flat files on daily basis, each day the file name is different because its appended with that day's date. There's no way I can make the program overwrite the original file and not append the filename with the date.
I have an SSIS package that needs to use this flat file. It needs to grab the latest file in the folder, except the file name is different every day (due to the date being part of the file name)
I am left now needing a batch file that could do this:
1- delete any file older than 20hr (yesterday's file) -- leaving 1 file (today's file) in this folder. The file name has todays date in it.
2- grab this 1/only file in this folder (no matter what the file name is) and rename it to some standard name (i.e. StudentDataExport.csv) which the SSIS package will be looking for.
I have basic knowledge of batch file scripting, I need help please in figuring/show me code that does # 1 and 2 above.
Many thanks