What do the Properties mean?

May 26, 2010 at 12:09 AM

Firstly I'm a novice at using CodePlex software so please forgive me if the answer to this is obvous.

I installed the 1.2.0.0 release and incorporated it into a package I was developing. When I viewed the properties, I could not figure out how to specify my input and output file names. The earlier release had a property corresponding to the source and target file names but just a directory one in the latest release. Secondly there were other properties that I could not tell what they are for such as FileZip. Perhaps this is the property that tells the operation what the Source and Target file are called but if so, how do I specify a different file extension for source from input?

I have guessed that the full path and filename should be specified in FolderDestination and FolderSource but from the result of running this, that doesn't appear to be correct.

Is there a document somewhere that will tell me how to use the properties?

Coordinator
Jun 4, 2010 at 10:28 AM
Hi well there is two folder (source and destination) and one property for set file zip name (FileZip) with parameter TypeOperation you chose what operation make (compress or decompress) RegExFileFilter parameter is a regular expression to filter file. p
Aug 11, 2010 at 6:49 AM
Edited Aug 11, 2010 at 6:55 AM

Works reliably, could do with some documentation though...so here's some advice...

All the Properties in 'UnZip SSIS Parameters' section can be set either by literals or using expressions:

Most important properties are:

  • TypeOperation ( choose Compress to Zip or Decompress to UnZip)
  • FolderSource
  • FolderDestination
  • RegExFileFilter (Use a .NET regular expression string to limit the files you want to zip from the FolderSource ...seems to only be of use in Compress mode??)
  • FileZip (Depending on the TypeOperation you have set this is either the output zip file, or the file you want to UnZip/Decompress)

Notes on Compress mode:

You cannot use a specific file name as the 'FolderSource' property (rather than a folder).. it just creates an empty zip file.

This means that if you want to use TaskUnZip to zip up whole folders into one .zip it is great…but if you want to zip each file into an individual .zip it will require a little work...one way around this would be to move files into individual folders.

N.B.  If there are no files in the folder source (or that match the RegEx) then TaskUnZip still produces an empty zip file.  You can get round this by adding a script task before that counts files and cancels package, or transfers control elsewhere if there are no files to work on.

Notes on Decompress mode:

If you have a number of files in a folder you want to unzip, you still have to specify the file to unzip (FileZip property) ..i.e. you cannot leave this blank and just specify 'FolderSource' and expect it to unzip all of the .zip files in the folder.

 Therefore you will have to put taskunzip into a "For Each FILE IN FOLDER" loop (setting the FileSpec to *.zip) and map a variable to the collection value...then you can use that variable in the expression for FileZip property.

 

Coordinator
Aug 11, 2010 at 7:35 AM

Tnx darrenshrwd!

Insert your answer in documentation section!

p