SSIS Script Task to Compress File
I need to zip a file on a share such as \\Share\Directory$\BIGexcelfile.xls I see alot of info that sterrs us to using a 2rd pary zip via a command line or something. But in a large organization I need to stick to using native windows compression as it is a server I have no control over - does anyone have an example using the native windows compression - and Uh - MS - Hello - was this an oversight - did you not think about this before 2011? Why is this not a Task in SSIS using native tools? KDW
May 17th, 2011 3:42pm

I personally like the Zip Task from CozyRoc http://www.cozyroc.com/ssis/zip-task which is pretty cost effective and you can make an arguement for adding it to your built in SSIS tasks as an add-in to what is there already. You can see it used in this blog http://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/compress-data-partition-snapshots-with You can call command line utilities or write a script task to do compressing. http://www.gzip.org/ is one but you have to be careful on return codes and verification the zip process was successful. Take a look at this listing also for solutions. If you cannot spend money on third party ssis components, look to a script task for handling it but be careful on processing control flow http://www.example-code.com/csharp/zip.asp Also remember that SSIS is more of an ETL platform and zipping up files is not a common task. We can hope it is in the pipe though so turning to C# in script tasks isn't needed.Ted Krueger Blog on lessthandot.com @onpnt on twitter Please click the Mark as Answer button if a post solves your problem!
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 3:57pm

Here is an example with a Script Task that zips: http://microsoft-ssis.blogspot.com/2011/01/zip-sourcefile-to-archive.html Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
May 17th, 2011 5:08pm

Thanks Joost - I've read it before and we are a few months away from our 2008 deployment so it does not appear that blog will help as I am on 2005....KDW
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 6:37pm

I have posted on this before - there seems to be no way to code up the MS Windows compression (I was looking for exactly that functionality myself) I ended up coding a little routine in a script task that seems to work very nicely - this thread has the code: http://social.msdn.microsoft.com/Forums/en/sqlintegrationservices/thread/4cdc3661-f75f-4857-8909-0ca366c63caaRgds Geoff
May 17th, 2011 11:39pm

Thanks Joost - I've read it before and we are a few months away from our 2008 deployment so it does not appear that blog will help as I am on 2005.... KDW it's should be not that hard to translate it to VB.net so you can use it in 2005... only a few lines of code.Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2011 2:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics