DeleteFileVersionsByMasterIds Method
Purges older versions of a file based on certian criteria.
Required Permissions
FileDeleteConditionalSyntax
public FileDelStatus[] DeleteFileVersionsByMasterIds(
System.long[] fileMasterIds,
System.bool deleteUncontrolledVersions,
System.int keepCount,
System.int minAge,
System.string comment
)Public Function DeleteFileVersionsByMasterIds( _
ByVal fileMasterIds() As System.Long, _
ByVal deleteUncontrolledVersions As System.Boolean, _
ByVal keepCount As System.Integer, _
ByVal minAge As System.Integer, _
ByVal comment As System.String _
) As FileDelStatus()Parameters
| Name | Description |
|---|---|
| fileMasterIds | An array of File Masters IDs. |
| deleteUncontrolledVersions | If false, all versions that can be purged are purged. If true, the versions purged are dependent on the next 3 parameters. |
| keepCount | The number of versions to keep. Example: If there are 10 versions of a file and this value is 7, then only the first 3 versions will be deleted. This parameter is only used if deleteUncontrolledVersions is true. |
| minAge | The minimum age, in days, that a version has to be. Example: If this value is 60, then only versions older than 60 days will be deleted. This parameter is only used if deleteUncontrolledVersions is true. |
| comment | Versions will not be deleted if this value is in the comment. Example: If this value is 'approved', then versions with the word 'approved' in the comment text will not be deleted. This parameter is only used if deleteUncontrolledVersions is true. |
Return Value
A report of which versions have been deleted and which versions have not.
Remarks
Even if a version meets all of the passed in criteria, it does not guarantee that the version will be deleted. Versions linked to Items will not be deleted. Labeled or locked versions will not be deleted. Versions will not be deleted if they are linked to other versions which are not also being deleted. The most recent version cannot be deleted.
If there is no matching return object for a given input file ID, it can be assumed that the version was not deleted.