FileSpec.Rename Method (FileSpec, Logic) | |
Rename the file represented by this file specification.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VOSystemClasses (in XSharp.VOSystemClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD Rename(
oFSTarget AS FileSpec,
lName AS LOGIC
) AS LOGIC
public virtual bool Rename(
FileSpec oFSTarget,
[DefaultParameterValueAttribute(false, 0)] bool lName
)
Request Example
View SourceParameters
- oFSTarget
- Type: FileSpec
The new file name. - lName
- Type: Logic
Make a different file name if conflict exist.
The new name will start with the base file name of the original file.
8 character file name with 5 or 6 chars of original name plus a suffix
ranging from "_1" to "_99" if a name conflict occurs. Otherwise returns NULL_STRING
Return Value
Type:
Logic
TRUE if the file was successfully renamed; otherwise, FALSE.
Examples
The following examples renames a file:
1oFSSource := FileSpec{"c =:\data\customer.dbf"}
2
3oFSSource:Rename("customer.bak")
See Also