int RenameFile (char existingFileName[], char newFileName[]);
Renames an existing file or a group of existing files.
RenameFile fails if a file already exists with the new filename. If this error occurs after renaming some of the files in a group, this function returns immediately.
RenameFile can rename files across different disk drives. If you specify different disk drives in the parameters, RenameFile copies the source to the target and then deletes the source file.
Linux If you specify files on different file systems, RenameFile copies the source to the target and then deletes the source file.
Input | ||
Name | Type | Description |
existingFileName | string | The pathname of the file to rename. existingFileName can contain DOS wildcard characters '?' and '*,' in which case RenameFile renames all matching files. If you specify an empty string "", RenameFile renames the file found by the most recent call to GetFirstFile or GetNextFile. |
newFileName | string | The pathname of the new file name. newFileName can contain DOS wildcard characters '?' and '*,' in which case RenameFile matches the filename to existingFileName. |
Name | Type | Description | ||||||||||||||||||||
result | integer | The result of the call.
|