Click here to Skip to main content
Click here to Skip to main content

How to Rar and UnRar Files in SSIS 2008 R2

, 18 Feb 2014
Rate this:
Please Sign up or sign in to vote.
Here we rar and unrar the files in SSIS

Introduction

This tip will show you how to Rar and UnRar files like Excel, Text Files, XML Files, etc. in SSIS 2008 R2.

Using the Code

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 = e -o+ "C:\ZipUnZipSample\ZipFiles\ZipFiles.rar" "C:\ZipUnZipSample\UnZipFiles\"
  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.  

License

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

About the Author

Manik Vatharkar
Software Developer (Senior)
India India
No Biography provided

Comments and Discussions

 
QuestionThank you PinmemberKalpana Volety2-Mar-14 7:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 18 Feb 2014
Article Copyright 2014 by Manik Vatharkar
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid