os.Path.rename

The os.Path.rename is used to change a file or a directory name. The syntax of the function is as follows:

 

CALL os.Path.rename(old_name, new_name) RETURNING result

 

where:

·         old_name = a STRING variable standing for the current name of the file or directory,

·         new_name = a STRING variable standing for the name to be assigned to the file or directory,

·         result =TRUE if the function has been successfully executed and the file or directory has received the new name or FALSE otherwise.