User (Old forums)MemberJanuary 23, 2010 at 2:52 amPost count: 23064
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?
Imported from legacy forums. Posted by Cory (had 1573 views)User (Old forums)MemberJanuary 25, 2010 at 10:00 amPost 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.”
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….
Imported from legacy forums. Posted by Dan (had 324 views)
- You must be logged in to reply to this topic.