Archieve all the files in a folder using SSIS

  • Hi All,

    I need to archive around 100 csv files in a folder to a zip file. The zip file will be named abcd_<date>.zip.

    This task needs to be compleetd every week.

    Please suggest an efficient way to do this.

  • Hi,

    You need to have compressing softwares installed for this. E.g winzip, WinRar, 7- Zip etc. . Winzip and WinRar are licensed but 7-zip is an opensource.

    You can create a Bat file that will call the zipping executable with correct arguments passed from the SSIS parameters and use the execute process task to call this bat file for compressing.

    An example of how to achieve this using 7-Zipcan be found in the link below,

    http://sqlage.blogspot.se/2013/12/ssis-how-to-compress-and-archive-file.html

    You can use the for each loop container to compress individual files , or change the argument in the bat files to compress the entire folder.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply