Skip to content

FILE_RENAME

FILE_RENAME renames a file.

Syntax

leo-grammar
CC "AdoScript" FILE_RENAME from:strValue to:strValue .
# -->RESULT ecode:intValue
CC "AdoScript" FILE_RENAME from:strValue to:strValue .
# -->RESULT ecode:intValue

Parameters

  • from (strValue) - the old name (inclusive path)
  • to (strValue) - the new name (inclusive path)

Returns

  • ecode (intValue) - has the value 0 if no errors occurred, 1 if the file was not renamed.

Details

Relative paths relate to the current working directory (CWD).

Files stored in the ADOxx database can be renamed by preceding the filename with the string db:\

The new name can only be created if the full filename (drive letter + absolute path + file name) is not longer than 260 characters.

See Also

Examples

asc
CC "AdoScript" FILE_RENAME from:"c:\\temp\\myfile.txt" to:"c:\\temp\\mynewfile.txt"
CC "AdoScript" FILE_RENAME from:"c:\\temp\\myfile.txt" to:"c:\\temp\\mynewfile.txt"

Versions and Changes

Available since ADOxx 1.3