rename: changes the file name : rename « stdio.h « C / ANSI-C






rename: changes the file name


    

//Header file:     #include <stdio.h>  
//Declaration:     int rename(const char *oldfname, const char *newfname); 
//Return:          returns 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;
  }

           
       








Related examples in the same category