renamefile#

Purpose#

Changes file name.

Format#

ret = renamefile("oldname", "newname")#
Parameters:
  • oldname (string) – existing file name.

  • newname (string) – new file name.

Returns:

ret (scalar) – 0 if successful.

Examples#

ret = renamefile("myfile.gss", "mynewfile.gss");

In this example, a file in the current working directory with the name "myfile.gss" will be renamed "mynewfile.gss" in the same directory. Full path information may also be included:

// On Windows
ret = renamefile("c:\\gauss23\\myfile.gss",
  "c:\\gauss23\\mynewfile.gss");

// On Linux/Mac
ret = renamefile("/home/user/gauss23/myfile.gss",
  "/home/user/gauss23/mynewfile.gss");