rename : rename « stdio.h « C Tutorial






ItemValue
Header filestdio.h
Declarationint rename(const char *oldfname, const char *newfname);
Functionchanges the file name.
Returnreturns zero on success or nonzero on error.


#include <stdio.h>

  int main(int argc, char *argv[])
  {
    if(rename("oldName", "newName") != 0){
       printf("Rename Error");
    }
    return 0;
  }








22.29.rename
22.29.1.rename