Click or drag to resize

FileSpec.Rename Method

X#
Rename the file represented by this file specification.

Namespace:  VO
Assembly:  VOSystemClasses (in VOSystemClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD Rename(
	oFSTarget,
	lName
) AS USUAL CLIPPER
Request Example View Source

Parameters

oFSTarget (Optional)
Type: Usual
The new file name.
lName (Optional)
Type: Usual
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: Usual
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