Contents - Index - Previous - Next
Selected property
Applies to
TVCLUnZip component
Declaration
property Selected[Index]: Integer: Boolean;
Description
Setting this property to True for any file in an archive will allow you to unzip it using one of the unzip methods that unzip files based on its index. For instance the following will unzip all files .TXT files in the archive:
With VCLZip1 do begin ZipName := 'c:\test\test.zip'; /* Open existing zip file */
For i := 0 to Count-1 do
If UpperCase(ExtractFileExt(Filename[i])) = '.TXT' then
Selected[i] := True; /* Flag text files as selected */
DestDir := 'c:\test\newdir';
NumUnZipped := UnZipSelected;
end;
After returning from the UnZipSelected method, all files will have their Selected property set back to False;
See Also:
Run-time only