I am using csv files that are run every day and stored in a folder with the same name but with todays date, so I am trying to just pick the most current date to load ... below is the script I am working with.
LOAD [UCS Domain] as 'CAV CS Domain', Org as CAVLOB, [Host Name] as CAVHostName, [Hardware Status] as CAVHardwareStatus, [SAN Name] as CAVSANName FROM [\san$\SAN-Fabric-Refresh\VSI-Pending-Reboots\AP-HK-Cavendish\hkcdhvsi.pending-reboots.2020-01-31.csv] (txt, codepage is 28591, embedded labels, delimiter is ',', msq);
Another option might be to create an 'archive' folder where you run an external command in our script to RoboCopy the new file to the archive after you have read it such that you only have to worry about the new single file etc...
Be sure to return to the thread if the other poster's response worked for you, use the Accept as solution button on their post to mark it, otherwise leave an update on things.
To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question. I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.