Rar and UnRar the files in SSIS 2008 R2


In this article we are looking for how to Rar and Unrar the files like Excel,Text Files,XML or any other files by using the SSIS 2008 R2. We can compress or expand the files by using the Execute Process Task in SSIS 2008 R2.

Follow the below steps for Rar and UnRar the files in SSIS 2008 R2.

Step 1:

Create the "ZipUnZipSample" folders in C:\ path. Create the 3 other folders in "ZipUnZipSample" folder. Give the names for folders ExcelFiles, "UnZipFiles" and "ZipFiles". Add excel file (.xlsx) in ExcelFiles folders.

Step 2:

Create the project and package in SSIS 2008 R2.

Step 3:

Add Execute Process Task in Control Flow tab. Change the name "Rar files". Right click and click on Edit option to open the Editor. Select on the Process tab from left pane. Set the below properties,

1. Executable = C:\Program Files\WinRAR\WinRAR.exe

2. Arguments =a "C:\ZipUnZipSample\ZipFiles\ZipFiles.rar" "C:\ZipUnZipSample\ExcelFiles\*.xlsx"

3. WindowStyle = Hidden

Step 4:

Add another Execute Process Task in Control Flow Tab. Change the name "UnRar files". Right click and click on Edit option to open the Editor. Select on the Process tab from left pane. Set the below properties,

1. Executable = C:\Program Files\WinRAR\WinRAR.exe

2. Arguments = a "C:\ZipUnZipSample\ZipFiles\ZipFiles.rar" "C:\ZipUnZipSample\ExcelFiles\*.xlsx"

3. WindowStyle = Hidden

Step 5:

Connect the Rar Files Task to UnRar Files Task with Success constraint.

Step 6:

Now run the package to Rar and UnRar files.



Step 7:

Check the ZipFiles and UnZipFiles folders.


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: