Skip to content

Copy

Creates a new copy of the file.

1
myDocumentFiles.Copy(id: string):FileInfo

Parameters

string id
    The ID of the file to copy.

Returns

A copied FileInfo instance.

Remarks

This method throws an exception if the given file ID is not found.

Examples

Keep a copy of a file before it changes

1
2
var copy = $Files.Copy($Xml.Evaluate('ContractFile'));
$Xml.SetValue('OriginalContractFile', copy.Id);

See Also