Please enable JavaScript to view this site.

Rename the desired file with a new path and/or filename.

Syntax

renameFile(string source, string target): bool

source

Name of the source file

target

Name of the target file

Result

Return operation logical result

Notes:

Jolly character are not allowed in the name of the file (source/target).

Relative name of file (source/target) will be referred to current directory path (see dirPath() method).

On most file systems, renameFile() fails only if source does not exist or if target and source are not on the same partition. On Windows, renameFile() will fail if target already exists.

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC