Home Forums ActiveX components Xceed Zip for ActiveX & x64 Pass a text file with the list of files to zip?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #42410 |

    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!

    Imported from legacy forums. Posted by Cory (had 1573 views)

    User (Old forums)
    Member
    Post count: 23064

    “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

     

    Imported from legacy forums. Posted by Dan (had 324 views)

    User (Old forums)
    Member
    Post count: 23064

    Unfortunately performance is a significant concern for our application so we’d really like to get it all in one zip operaion if possible.

    Imported from legacy forums. Posted by Cory (had 1879 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.