Utilities.RenameFile Method

Applies to TestComplete 14.10, last modified on June 5, 2019
This method is obsolete. See the Remarks section below.

Description

Use the Utilities.RenameFile method to change the name of the file or folder specified by the OldName parameter to NewName.

Declaration

Utilities.RenameFile(OldNameNewName)

OldName [in]    Required    String    
NewName [in]    Required    String    
Result Boolean

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

OldName

Specifies the name of the file or folder to be renamed.

NewName

Specifies the new name of the desired file or folder.

Result Value

If the operation succeeds, RenameFile returns True. If RenameFile cannot rename the file or folder (for instance, if the application has no permission to modify the file/folder or NewName represents the name of an existing file/folder), it returns False.

Remarks

This method is obsolete. It is supported for backward compatibility only. To rename files and folders, use one of the following methods: aqFileSystem.RenameFile, aqFileSystem.RenameFolder, aqFile.Rename, aqFileInfo.Rename or aqFolderInfo.Rename.

See Also

aqFileSystem.RenameFile Method
aqFileSystem.RenameFolder Method
aqFile.Rename Method
Rename Method
Rename Method
aqFileSystem.Exists Method
aqFileSystem.GetFileName Method
aqFileSystem.GetFileExtension Method
aqFileSystem.GetFileFolder Method

Highlight search results