Click or drag to resize

FileSpec.Rename Method (FileSpec, Logic)

X#
Rename the file represented by this file specification.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOSystemClasses (in XSharp.VOSystemClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD Rename(
	oFSTarget AS FileSpec,
	 lName AS LOGIC
) AS LOGIC
Request Example View Source

Parameters

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:
X#
1oFSSource := FileSpec{"c =:\data\customer.dbf"}
2// Rename the file
3oFSSource:Rename("customer.bak")
See Also