<< back to sysax.com Product page

4.4. Rules to handle duplicates

The SetDupeRules method can be used to specify the action to take when an identically named file is already present in the destination. The comparison can be performed based on size using the "bysize" keyword or based on date and time using the "bydate" keyword. The possible actions are "overwrite", "rename", "resume", and "skip". If the rename action is selected, an optional rename extension can also be specified (the default extension is .fbak). Rules are specified for the following 3 cases: when the destination file is smaller or older, is of equal size, and larger or newer

Exhibit 4.7. IDL Definition of method to rules to handle duplicates


HRESULT SetDupeRules ([in] BSTR b_bysizedate, [in] BSTR b_smallerolder, [in] BSTR b_samesizedate, [in] BSTR b_largernewer, [in, defaultvalue("")] BSTR b_renameext);


Exhibit 4.8. Example usage of method to rules to handle duplicates (VBScript)


'compare by size - overwrite if smaller, skip if equal, else rename 
app.SetDupeRules "bysize", "overwrite", "skip", "rename", ".bak"