How do I pick the most recently created folder using Foreach loop container in SSIS package?

前端 未结 2 1272
慢半拍i
慢半拍i 2021-01-25 03:05

I\'ve got an interesting challenge with SSIS. Using a for-each file enumerator, I need to pick the subfolder which has been most recently created, and then iterate through each

2条回答
  •  借酒劲吻你
    2021-01-25 03:55

    Iterate through the folders. Save the name of the first one. Compare that saved value to the name of each subsequent folder. If the next folder is more recent, swap that name in and keep going. At the end, your saved value will be the name of the most recent folder (if you're comparing creation dates, you'll need to save both the folder name and the creation date).

    You can then use the saved value as an argument to your second iteration loop.

提交回复
热议问题