public void RenameVersionFile( DocumentVersion docVersion, string newVersionFileName, bool saveOldExtension )
Rename the document version
Syntax
public void RenameVersionFile( DocumentVersion docVersion, string newVersionFileName, bool saveOldExtension )
Parameters
- docVersion
- Type: DocumentVersion
Version, whose file needs to be renamed. Object. Access path: PublicAPI.Docflow.DocumentVersion
- newVersionFileName
- Type: System String
Changed version new name
- saveOldExtension
- Type: System Boolean
Save the old file version extension
Examples
//load a document version by ID var docVersion = PublicAPI.Docflow.DocumentVersion.Load(3); //new document version name var versionName = "New document version name.exe"; //Save the old file version extension (yes or no) var saveOldExtension = true; //rename the document version PublicAPI.Docflow.DocumentVersionFile.RenameVersionFile(docVersion, versionName, saveOldExtension) //WARNING!! saveOldExtension parameter use case: //1. If the old document version name was "Version.txt", then when saveOldExtension = true the new name is "New document version name.txt" //2. If the old document version name was "Version.txt", then when saveOldExtension = false the new name is "New document version name.exe"
See Also