Sometime client provides many Flat files\Excel files zipped into single zip file. There are many ways to unzip the files. We can use WinZip and WinRar,but they are not free. In this blog, we will see about how to use 7 zip for extracting the data. 7-Zip is free to use and support all compressed format . It’s a open source, we have used in our customer environment.You can use the following link to download.
Download 7-Zip and install.
I am going to use Sample.zip file in location “C:\Users\gowdhdhan\Desktop\SampleData\SampleZipFiles\” for demo purpose. Execute process task will extract the source files to “C:\Users\gowdhdhan\Desktop\SampleData\SrcFiles” folder.
Execute Progress Task for running 7 Zip
- Create SSIS package and “Execute Progress Task” in control flow.
- Configure “Execute Progress Task” something as follows. (argument “e” stands for extract)
Executable C:\Program Files\7-Zip\7z.exe Arguments e "C:\Users\gowdhdhan\Desktop\SampleData\SampleZipFiles\Sample.zip" Working directory C:\Users\gowdhdhan\Desktop\SampleData\SrcFiles
- Click “Ok”
Run the SSIS package. All the files are moved to “C:\Users\gowdhdhan\Desktop\SampleData\SrcFiles” location. Source files are ready and can be used for further processing. I will write about using “ForEach loop container” in separate post.
Thanks for reading .
-Gowdhaman
thanks for the sharing, does it able to unzip big file? i tried and it failed with exit code =2.
ReplyDelete