TheCommunicator
asked on
Unzipping files from SSIS
I want to unzip files using SSIS package:
I have browsed many blogs before asking this question. I have little blurred picture of what I am supposed to do.
1.Use executable process task.
1.1 In process pan select the application name which I want to use in "Executables" option.
1.2 In argument pass the File name.
Now, what?
I came across some discussions which talk about passing command line? How does that work? do I have to write some script in C#? If I do write it then how to I pass that script to SSIS?
Is there any particular guidance on how to write this script?
Where do I specify the folder where the extracted items are going to be launched??
If it can be done exclusively by SSIS without including script then that would be my first preference.
I am not sure how the whole thing is going to work.
Ca somebody please guide me?
I have browsed many blogs before asking this question. I have little blurred picture of what I am supposed to do.
1.Use executable process task.
1.1 In process pan select the application name which I want to use in "Executables" option.
1.2 In argument pass the File name.
Now, what?
I came across some discussions which talk about passing command line? How does that work? do I have to write some script in C#? If I do write it then how to I pass that script to SSIS?
Is there any particular guidance on how to write this script?
Where do I specify the folder where the extracted items are going to be launched??
If it can be done exclusively by SSIS without including script then that would be my first preference.
I am not sure how the whole thing is going to work.
Ca somebody please guide me?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much guys. I am really sorry for getting back late to you guys. Well, I have just read both of the articles forwarded by you guys. I have first tried method suggested by selva_kongu.
In this case, I would have to say that it works very fine. I am basically using WinRar instead of WinZip and I think that it successfully opens file with WinRar. But it stops there. I mean to say how would I tell WinRar using Execute task that you have to extract it as well and. You have to extract it in this particular folder ?
I am attaching a screenshot of what Winrar open for me.
WinRarScreenShot.jpg
In this case, I would have to say that it works very fine. I am basically using WinRar instead of WinZip and I think that it successfully opens file with WinRar. But it stops there. I mean to say how would I tell WinRar using Execute task that you have to extract it as well and. You have to extract it in this particular folder ?
I am attaching a screenshot of what Winrar open for me.
WinRarScreenShot.jpg
ASKER
@teebon: I have actually downloaded the tool setup form the link that you forwarded to me and I did run the set up.
Now, I m referring to the article that you forwarded to me and in that, they say in the second step that, run TaskUnZip\TaskUnZip\bin\De bug\Instal l.cmd. But where would be this folder located. I mean I really don't see any folder called Taskunzip created in my system after I did run the setup. Would you please throw some light on this??
Now, I m referring to the article that you forwarded to me and in that, they say in the second step that, run TaskUnZip\TaskUnZip\bin\De
Hi TheCommunicator,
The second step you refering to is only applicable to Manual Installation, by running the setup installer you should need to refer to the MSI Installation section only.
If you are using MSSQL 2005, after setup and follow this step:
Open Visual Studio -> Tools -> Choose ToolBox Item -> SSIS Control Flow Items -> Check "TaskUnZip"
It should work just fine.
The second step you refering to is only applicable to Manual Installation, by running the setup installer you should need to refer to the MSI Installation section only.
If you are using MSSQL 2005, after setup and follow this step:
Open Visual Studio -> Tools -> Choose ToolBox Item -> SSIS Control Flow Items -> Check "TaskUnZip"
It should work just fine.
ASKER
oh, Well I am using Visual studio 2008 and as you said, I have to "download the source project, change the reference of these two assemblies:
Microsoft.SqlServer.Dts.De sign
Microsoft.SQLServer.Manage dDTS ?"
hmmmmmmm. Source project means MY source project? I mean my dtsx package? Please don't mind I am really newbie.
Microsoft.SqlServer.Dts.De
Microsoft.SQLServer.Manage
hmmmmmmm. Source project means MY source project? I mean my dtsx package? Please don't mind I am really newbie.
Hi TheCommunicator,
I've uploaded the updated installer for mssql 2008:
http://www.filedropper.com/taskunzipsetup
Please have a try.
I've uploaded the updated installer for mssql 2008:
http://www.filedropper.com/taskunzipsetup
Please have a try.
If you would like to customize the task by yourself, the source project I meant was the second download link in this page:
http://taskunzip.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=15016
http://taskunzip.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=15016
ASKER
I have downloaded the latest visual studio 2008 version that you sent me and it was installed fine but the I am not able to see TaskUnZip tool in the "SSIS Control Flow Items " list. I am not sure why?
Can you have a check whether TaskUnZip.dll is inside the following folder?
C:\Program Files\Microsoft SQL Server\100\DTS\Tasks
If it does. Try restarting the SSIS service:
Start -> Run.. -> cmd -> services.msc -> Right Click "SQL Server Integration Services 10.0" -> Restart
Then restart your VS2008 also and try again.
C:\Program Files\Microsoft SQL Server\100\DTS\Tasks
If it does. Try restarting the SSIS service:
Start -> Run.. -> cmd -> services.msc -> Right Click "SQL Server Integration Services 10.0" -> Restart
Then restart your VS2008 also and try again.
ASKER
TaskUnZip.dll is not in "C:\Program Files\Microsoft SQL Server\100\DTS\Tasks", should I run the setup again?
Hi,
I think it's my mistake, I didn't change the installer default path. Uninstall the previous one, and reinstall using this new setup file:
http://www.filedropper.com/taskunzipsetup_1
I think it's my mistake, I didn't change the installer default path. Uninstall the previous one, and reinstall using this new setup file:
http://www.filedropper.com/taskunzipsetup_1
ASKER
Ok I have successfully installed it and it is in my toolbox at this moment. Thank you very much for being with me on this conversation. Well, I think you have invested enough in this question and it is time to give you points.
I will try to implement task_unzip and if I see any problem then i will post the question. Hopefully you catch that as you are familiar with the tool.
Thanks
I will try to implement task_unzip and if I see any problem then i will post the question. Hopefully you catch that as you are familiar with the tool.
Thanks
ASKER
Is there any tutorial on how to handle this tool?
So far there is no tutorial for this tool yet. But the basic idea is to use a foreach loop to lopp through a list of files and perform the TaskUnZip's task.
This is not the tutorial for TaskUnzip but it should give you an idea on how to loop through a list of files:
http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx
This is not the tutorial for TaskUnzip but it should give you an idea on how to loop through a list of files:
http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx
2. Double click to set the parameters
3. In the process Tab, enter the path to the Winzip32.exe (which tends to be C:\Program Files\WinZip\WINZIP32.EXE although you can use expressions to set this using the config file if you need to consider that it may be installed in different locations on different servers)
4. Select the arguments you wish to pass to the exe using the arguments field, or via expressions if you wish to use variables or a dynamic filename. You can also set the working directory & other required options here - although they are not necessary.
A good article that lists the available command line options for calling Winzip can be found here:
http://www.memecode.com/docs/winzip.html
Winzip.JPG