ares
New Member
Posts: 12
|
Post by ares on Oct 23, 2008 8:29:08 GMT -5
Hi!
What exactly is the meaning of NumFiles value in OnStartUnZipInfo event?
I thought this would the total number of files to be processed which is equal to the number of files in Zipper.FilesList... But this not the case. Currently I am observing something like NumFiles=81 and FilesList.Count=87.
Does this mean that some files of the FilesList will not be processed? How do I find out which files this will be?
Thanks Ares
|
|
|
Post by Kevin on Oct 26, 2008 8:56:26 GMT -5
By making sure you have an OnSkippingFile event. That should show you which files are being skipped. Or if it is possible that some files might be password protected, you would want an OnBadPassword event too. When you initially fill FilesList it could contain things like duplicates and files that can't be opened for some reason or files that could not be found for some reason. Numfiles would contain the number of files left in FilesList after VCLZip first goes through them all to be sure they actually exist before starting the zipping process.
NumFiles can also be larger than the initial number of entries in FilesList if any of the entries are wildcards.
Some of the other reasons for skipping files are
1. If what you put in your FilesList was also in the ExcludeList 2. If the SkipIfArchiveBitNotSet property is true and the archive bit is not set for the file 3. If you are modifying an existing archive and the file already exists in the archive. 4. If you used wildcards, VCLZip will avoid zipping the archive that is being created if the wildcard expanded to include it.
|
|
ares
New Member
Posts: 12
|
Post by ares on Oct 26, 2008 11:04:36 GMT -5
I do use a OnSkippingFile event but it is not called. The first event when starting to unszip is OnStartUnZipInfo which show NumFiles=81 and FilesListCount=87.
Numfiles would contain the number of files left in FilesList after VCLZip first goes through them all to be sure they actually exist before starting the zipping process.
Is OnStartUnZipInfo called before or after this initial scan of the FilesList?
The following order of events would be logical: 1. Start unzip 2. Scan FileList for dublicates, files which can not be opend and so on. Delete them from the FilesList 3. Call OnSkippingFile for each file deleted form FilesList 4. Call OnStartUnZipInfo to show how many files are realy unzipped.
But as I said, OnSkippingFile is not called but NumFiles is smaller than FilesList.Count. So some files where dropped form the FilesList without any notification. How do I find out which files these are?
|
|
|
Post by Kevin on Oct 26, 2008 13:39:11 GMT -5
I'm not sure why you are getting the results you are getting. That is the order that VCLZip does it. In fact, VCLZip passes in FilesList.Count as the value for the parameter for NumFiles.
.... Ahh, wait, here is a possibility. I forgot about the OnNoSuchFile event. If VCLZip cannot find the file it calls the OnNoSuchFile event. I think that event was created before the OnSkippingFile event -- it might make sense for me to modify so it might make sense for me to modify VCLZip to call OnSkippingFile in this case also. So make sure you have an OnNoSuchFile event defined, that must be where the difference lies.
|
|