dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

Zipping files using VB .net (in SSIS) - sqlserver-programming

This is a discussion on Zipping files using VB .net (in SSIS) - sqlserver-programming ; 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 ...


Home > Database Forum > Microsoft SQL Server > sqlserver-programming > Zipping files using VB .net (in SSIS)

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 06-23-2008, 06:29 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Zipping files using VB .net (in SSIS)

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
Reply With Quote
  #2  
Old 06-23-2008, 06:45 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: Zipping files using VB .net (in SSIS)

I'd be interested in finding out if you could access the .NET
System.IO.Compression namespace from an SSIS script task. If so you could
use that to ZIP up some files.
http://msdn.microsoft.com/en-us/libr...on(VS.80).aspx


--

========
Michael Coles
"Pro SQL Server 2008 XML"
http://www.amazon.com/Pro-SQL-Server...dp/1590599837/


wrote in message
news:1cb0fda8-6a06-4822-98b6-adf82a5ee288@u12g2000prd.googlegroups.com...
>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



Reply With Quote
  #3  
Old 06-24-2008, 04:44 PM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: Zipping files using VB .net (in SSIS)


wrote in message
news:1cb0fda8-6a06-4822-98b6-adf82a5ee288@u12g2000prd.googlegroups.com...
>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

Reply With Quote
  #4  
Old 08-06-2009, 01:03 PM
Database Newbie
 
Join Date: Aug 2009
Posts: 1
srishree is on a distinguished road
Default Re: Zipping files using VB .net (in SSIS)

Hi Friend,

Can you please give me the ssis script to zip the files please. I want this one very badly at this time.We are working on a project where i have to zip upto 50 files using SSIS and it is at last stages, still we are unfinished due to this one.

waiting for your reply

Thanks in Advance

Regards,
Sri.
Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 09:39 AM.