
rename(+OldName, +NewName)

   Renames the file OldName to NewName.



Arguments
   OldName             String or atom.
   NewName             String or atom.

Type
   Operating System

Description
   OldName and NewName are absolute or relative pathnames of files.  Used
   to rename the file OldName with the name NewName.




Modes and Determinism
   rename(+, +) is det

Exceptions
     4 --- Either OldName or NewName are not instantiated.
     5 --- Either OldName or NewName are neither a string nor an atom.
   190 --- File OldName does not exist.

Examples
   
Success:
      [eclipse]: sh('ls file1').
      file1
      [eclipse]: rename(file1, file2).
      yes.
      [eclipse]: sh('ls file1 file2').
      file1 not found
      file2
      yes.

Error:
      rename(Old, any).             (Error 4).
      rename(any, New).             (Error 4).
      rename(1, any).               (Error 5).
      rename(notfile, newfile).     (Error 190).





See Also
   exists / 1, delete / 1, mkdir / 1
