|  | ||
| 
 | 
 int rename( char *oldname, char *newname ) 
 char *oldname; /* old filename */ char *newname; /* new filename */ 
 | 
 | ||||||||
| Synopsis | #include "stdio.h" 
 The rename function renames a file on disk. 
 | 
 | ||||||||
| Parameters | oldname and newname are null-terminated strings containing the old and new names of the designated file, respectively. 
 | 
 | ||||||||
| Return Value | rename returns 0 if the function was successful. If an error occurred, then rename returns a negative value, and sets errno (the system error variable) to one of the following: 
 
 
 | 
 | ||||||||
| See Also | 
 | |||||||||
| 
 | 
 |