Zipping files using VB .net (in SSIS)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • karen.google@hmoke.com

    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
  • Michael Coles

    #2
    Re: Zipping files using VB .net (in SSIS)

    I'd be interested in finding out if you could access the .NET
    System.IO.Compr ession namespace from an SSIS script task. If so you could
    use that to ZIP up some files.
    Contains classes that provide basic compression and decompression services for streams.



    --

    ========
    Michael Coles
    "Pro SQL Server 2008 XML"



    <karen.google@h moke.comwrote in message
    news:1cb0fda8-6a06-4822-98b6-adf82a5ee288@u1 2g2000prd.googl egroups.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

    Comment

    • Mr. Arnold

      #3
      Re: Zipping files using VB .net (in SSIS)


      <karen.google@h moke.comwrote in message
      news:1cb0fda8-6a06-4822-98b6-adf82a5ee288@u1 2g2000prd.googl egroups.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.



      Comment

      Working...