Table of Contents
Previous Section Next Section

rename

#include <stdio.h>int rename(const char *oldfname, const char *newfname);

The rename( ) function changes the name of the file specified by oldfname to newfname. The newfname must not match any existing directory entry.

The rename( ) function returns zero if successful and nonzero if an error has occurred.

A related function is remove( ).


Table of Contents
Previous Section Next Section