gedd
New Member
Posts: 2
|
Post by gedd on Mar 20, 2009 6:49:01 GMT -5
Hi Kevin and all Is it possible with VCLUnzip control to use FilesList property as the list of excluded (not included) files during unzipping ? I have no idea how to do this. Wildcards ? For example i have 100 files and i don't want to unzip test.txt. without using FilesList containing 99 files but only one that will be excluded Thanks in advance --- Ged
|
|
|
Post by Kevin on Mar 20, 2009 8:04:44 GMT -5
Hi Ged,
There is an ExcludeList for zipping, but there is no such thing for unzipping. You cannot use FilesList to do this, but there are a couple ways to do it that come to mind.
One way is to use the Selected[Index] property. Create a loop and check each Filename[Index] against the filename(s) that you want to exclude. If it does not match then set the Selected[Index] property to true. If it matches, don't do anything (its false by default) After the loop is done, call the UnZipSelected method instead of the UnZip method. Look up UnZipSelected in the help file and there is an example, including the loop.
The other way is to set the DoAll property to true and call UnZip. Normally this will cause all files to be unzipped. But, create an OnStartUnZip event. This gets called just before each file is unzipped. In that event, compare the FName parameter to the filename(s) you want to exclude. If it matches, then set the Skip parameter to True and that file won't be unzipped.
Hopefully one of these two ways will work for you. :-)
Thanks,
Kevin
|
|
gedd
New Member
Posts: 2
|
Post by gedd on Apr 1, 2009 5:03:01 GMT -5
I did it with OnStartUnZip Thx for advice
|
|
|
Post by Kevin on Apr 1, 2009 8:18:21 GMT -5
You're very welcome!
|
|