December 2005
Beginner to intermediate
618 pages
20h 19m
English
rename
Renames or moves a file
#include <stdio.h> intrename( const char *oldname, const char *newname);
The rename() function
changes the name of the file specified by
oldname to the string referenced by
newname. The pointer argument
oldname must refer to the name of an
existing file.
The function returns 0 on success. If rename() fails to rename the file, it
returns a nonzero value.
See the example for remove() in this
chapter.
Read now
Unlock full access