SSIS - How to Compress And Archive File In SSIS [ Execute Process Task ]


We receive different source files on daily basis. After loading them to our destination tables we want to compress them and Archive them to Archive folder in case we need to use them later. 

Solution :

We will be using 7 Zip to do this. 7 Zip is open source software and can be downloaded free.  Here is the link for more details

Step 1: 
Down  7 Zip from above link or from other resource on internet. We will be using the executable that is 7z.exe in SSIS to compress and archive our source file to Archive directory.

Step 2: 
I have created SourceFolder and ArchiveFolder on my desktop and my source folder has one excel file Book1.xlsx

Step 3:
Create three variables in your package and provide values as shown below. you can set the values of these variables by using configuration or by using For-each loop while loading the file etc.

Step 4: 
Bring Execute Process task to Control Flow pane and configure as shown below

Executable : @[User::VarZipExecutablePath]
Arguments: "a -t7z \""+@[User::VarArchivePath] + "\"  \"" + @[User::VarSourcePath] +"\""

Final Output: 
Let's run our package.

As we can see the the package ran successfully and compressed file is archived in Archive folder. 

For more details of switches available with 7z.exe, please visit 

The video tutorial is about "How to archive files by adding datetime to them and move to other folder. It does not show how to compress the files."


  1. I think there is a need to provide some information about SSIS and its utilities.That's beacause its actually a useful tool and there is a need to look more about its aspects.

    SSIS Postgresql Write

  2. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. Compress Video

  3. The effects of lypo spheric vitamin c have been remarkable throughout the short months I've been using it. I have improved skin health and immunological function and feel more energized and aware. This vitamin C supplement stands out because of its liposomal delivery system, which maximizes vitamin C absorption. The individual packets are also great for when I'm on the road because they are simple to utilize. In conclusion, anybody seeking to enhance their health and energy should consider using Lypo-Spheric Vitamin C.