next up previous

12.4.2.7 Rename

The rename function is used to change the name of a file.

Syntax

(rename <old-file-name> <new-file-name>)

Both <oldfilename> and <newfilename> must either be a string or symbol and may include directory specifiers. If a string is used, the backslash (\) and any other special characters that are part of either <oldfilename> or <newfilename> must be escaped with a backslash. The rename function returns TRUE if it was successful, otherwise FALSE.


Portability Note

The rename function uses the ANSI C function rename as a base. If the ANSI_COMPILER flag was disabled when CLIPS was compiled, then this function will be nonfunctional and always return FALSE.


next up previous