Click here to Skip to main content
13,860,571 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 13 Feb 2013
Licenced CPOL

Execute Process Task - Compress File Using 7-Zip

, 13 Feb 2013
Rate this:
Please Sign up or sign in to vote.
Using SQL Server Integration Services' Execute Process Task to compress a CSV file into a zip format using 7-Zip.


In this blog post, I will demonstrate using SQL Server Integration Services' Execute Process Task to compress a CSV file into a zip format using 7-Zip.



Recently, I have been involved in a project whereby I have been required to extract data into CSV files, compress the files into a zip format and email the newly compressed files. This blog post is the first of several posts to come whereby I will be demonstrating how to fulfill such a requirement.

Let’s begin by launching Microsoft Visual Studio and create a new Integration Services Project which is located under Business Intelligence Projects category. (If you are using SQL Server 2012 or later, you will have to launch SQL Server Data Tools – SSDT).

After you have assigned a project name, proceed to click and drag the Execute Process Task (EPT) into Control Flow pane from toolbox (SSIS Toolbox in SSDT).

Right click EPT and click on “Edit”.

Under the General Tab, you can assign relevant Name & Description. In this case, I have decided to name the task as “EPT – Compress File” whilst Description remains unchanged.

In the Process Tab, the EPT properties must be set as follows:

  • RequiredFullFileName: True
  • Executable: C:\Program Files\7-Zip\7zG.exe
  • Arguments: a “” “SIFISO_Test.csv
  • WorkingDirectory: C:\Test\Excel\20120930\
  • FailTaskIfReturnCodeIsNotSuccessValue: True
  • SuccessValue: 0
  • Timeout: 0
  • WindowStyle: Hidden

Basically, what we have done above is, among other things, set the Executable property to the .exe location of the compression software we are using; set the Arguments such that file “SIFISO_Test.csv” is compressed into “”; specified the working directory where the CSV file will be located and zip file created; hide the EXE window that appears when the file is being compressed.

It’s that simple!

Till next time folks, cheers!


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sifiso W Ndlovu
Technical Lead select SIFISO
South Africa South Africa
Sifiso W. Ndlovu is a certified Microsoft professional who holds a Master’s degree in IT Management from the University of Johannesburg. He specializes on a range of enterprise and consumer technologies using open source and proprietary software. He is the member of the Johannesburg SQL User Group wherein he has made several presentations on User Group Meetings and SQL Saturday sessions. He has written for a number of publications including and

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web06 | 2.8.190214.1 | Last Updated 13 Feb 2013
Article Copyright 2013 by Sifiso W Ndlovu
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid