Welcome to the Xceed Community | Help
Community Search  
More Search Options

Pass a text file with the list of files to zip?

Sort Posts: Previous Next
  •  01-23-2010, 2:52 AM Post no. 25528

    Pass a text file with the list of files to zip?

    It's a very long story as to why we want to do this, but is it possible, rather than putting file specification with wild cards in the FilesToProcess property, we'd like to pass it the path to a .txt file that contains the list of the files we want to zip?  The old pkzip command line product, and even the new winzip command line add-ons have that ability (which I know is not really a direct comparison, but just showing that there is some precedence for such a capability in the Zip world in general) but so far I don't see anything with the xceedzip.dll that looks like it's possible.  Just wanted to make sure I'm not missing something and maybe was possible.

    I know theoretically we could just read the text file and add each individual file to the FilesToProcess property, but we're concerned about having enough memory to handle the full file list.  Worst case, with a max string length of 260 characters for each path\file spec, if we've got 100,000 files (yes, they're very large zip files), that'd be 26,000,000 characters, or 26 Mb of memory we'd need!

    I suppose we could also do it in chunks, add a reasonable number of files to the property, tell it to zip those, add more files, zip those, etc.  But each zip operation adds time to the process.  We still want it to perform only one single zip operation for performance so want to pass it all files all at once.

    Or does anyone have any other alternative idea?

    Thanks!

  •  01-25-2010, 10:00 AM Post no. 25539 in reply to 25528

    Re: Pass a text file with the list of files to zip?

    "we could just read the text file and add each individual file to the FilesToProcess property, but we're concerned about having enough memory to handle the full file list."

     

    Cory,

    I'm doing just that.  Since I know the maximum length of a memory variable in my environment (visual foxpro), I just keep concatenating the file names together until either they are all done or I hit the limit.  When the limit is hit, I start the zip operation and wait for it to finish.  Then I start concatenating more file names, etc.  So I use a "chunking" approach, even though the chunks are really large.  Speed is not an issue in my application....

     

    Dan

     

  •  01-26-2010, 11:59 AM Post no. 25552 in reply to 25539

    Re: Pass a text file with the list of files to zip?

    Unfortunately performance is a significant concern for our application so we'd really like to get it all in one zip operaion if possible.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.