Zipping files using VB .net (in SSIS)

K

karen.google

I have an SSIS package that I'm converting from DTS (SQLServer 2005),
and the ActiveX Script Task (in VBScript) is deprecated, so I'm trying
to convert things to Script tasks (in VB .net).

I have a script that is zipping up some files, and it's using an old
Winzip, which I don't have on my pc, and certainly wouldn't have on
the server, once I got the code over there. So, I wanted to use the
built-in zip function for XP. If, in Windows explorer, I right-click
on a file, I can output that file to a zip file. So, how do I do that
in .net? Or, since the code I'm copying from shells to the command
line, how can I zip files using the command line? The assumption is
that I don't have anything extra installed, because I won't be able to
put it on our servers.

-thursday's geek
 
M

Mr. Arnold

I have an SSIS package that I'm converting from DTS (SQLServer 2005),
and the ActiveX Script Task (in VBScript) is deprecated, so I'm trying
to convert things to Script tasks (in VB .net).

I have a script that is zipping up some files, and it's using an old
Winzip, which I don't have on my pc, and certainly wouldn't have on
the server, once I got the code over there. So, I wanted to use the
built-in zip function for XP. If, in Windows explorer, I right-click
on a file, I can output that file to a zip file. So, how do I do that
in .net? Or, since the code I'm copying from shells to the command
line, how can I zip files using the command line? The assumption is
that I don't have anything extra installed, because I won't be able to
put it on our servers.


Here is an example of using one of the free zip libraries in code. You
should be able to find one in VB or it's not hard to use a C# example and
convert to VB. There are other free zip libraries use Google look them up.

http://www.codeproject.com/KB/recipes/zip.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top