Replace method

Replaces the contents of a file or creates a new version of it. The base filename remains the same, but if you replace a file with a file that has a different extension, the extension will be changed.

Syntax


C++
HRESULT Replace(
   BSTR FilePath,
   BSTR VersionName,
   BSTR VersionComment)
Scripting languages
Object.Replace
   FilePath as String,
   VersionName as String,
   VersionComment as String

Parameters


FilePath

The full path of the replacement file.

VersionName and VersionComment

If specified, these are the name and description of the new version. These comments appear in the version page's topic and do not affect the File object's name. These parameters are ignored unless the TrackVersions property is set to TRUE. [optional, default = empty string].

Return value


C++

The return code.

Scripting languages

None.

Remarks


If TrackVersions is set to TRUE and you omit the VersionName parameter, the version name of the new version is the same as the name of the file whose contents you are replacing.

Home

Applies to

IERUFile


See also

Tracking Versions