Xceed Zip Compression Library Documentation
UpdateZipDate method
Xceed Zip control reference > Xceed Zip control methods > UpdateZipDate method

Description

The UpdateZipDate method sets the date of the archive file to the most recent date among the files it contains.

Examples

 To update the "last modified date" of a zip file in regards to the most recent "last modified date" of the files that it contains:

Visual Basic Copy Code

xErr = xZip.UpdateZipDate( xutUpdateLastModifiedDate + xutFromRespectiveDate + xutUseNewestDate )

' Equivalent to:
xErr = xZip.UpdateZipDate( xutUpdateLastModifiedDate + xutFromLastModifiedDate + xutUseNewestDate )

' And to:
xErr = xZip.UpdateZipDate( xutDefaultBehavior )

'To update the "created date" of a zip file in regards to the oldest "created date" of the
'BMP files that it contains:
xZip.FilesToProcess = "*.bmp"
xErr = xZip.UpdateZipDate( xutUpdateCreatedDate + xutFromRespectiveDate + xutUseOldestDate )

' Once again, xutFromCreatedData can be used instead of xutFromRespectiveDate
' Update all the dates of the zip file in regards to the current date:
xErr = xZip.UpdateZipDate( xutUpdateAllDates + xutFromCurrentDate )                   

Declaration (ActiveX)  
Method UpdateZipDate( xOptions As xcdUpdateZipDateOptions )                    
Declaration (DLL API)  
void XzUpdateZipDate( HXCEEDZIP hZip, xcdUpdateZipDateOptions xOptions )                    
 

Parameters

Parameter Description
xOptions This parameter determines which of the zip file's dates will be updated   to the most recent date among the files it contains.

Return values

 If no file matches the specified filters, or a date is not specified, error 509  (xerNothingToDo) will be returned.

Remarks