Hi everyone,
I have an ssis package that loads data to different csv files. The package dynamically create new files for each of the destination csv everyday. This works fine but I need a task that moves old files from the current folder to an archive folder as the job runs.
For instance, if the current folder looks like this, I want the cleanup task to move files that are older than the current date to the archive folder.
Current Folder (before implementing the cleanup task)
- FileA_20181111.csv
- FileA_20181112.csv
- FileA_20181113.csv
- FileA_20181114.csv (today)
- FileB_20181111.csv
- FileB_20181112.csv
- FileB_20181113.csv
- FileB_20181114.csv (today)
- FileC_20181111.csv
- FileC_20181112.csv
- FileC_20181113.csv
- FileC_20181114.csv (today)
Current Folder (after implementing the cleanup task)
- FileA_20181114.csv (today)
- FileB_20181114.csv (today)
- FileC_20181114.csv (today)
Archive Folder (after implementing the cleanup task)
- FileA_20181111.csv
- FileA_20181112.csv
- FileA_20181113.csv
- FileB_20181111.csv
- FileB_20181112.csv
- FileB_20181113.csv
- FileC_20181111.csv
- FileC_20181112.csv
- FileC_20181113.csv
me