#include
int main ()
{
int result;
char oldname[] ="oldname.txt";
char newname[] ="newname.txt";
result= rename( oldname , newname );
if ( result == 0 )
puts ( "File successfully renamed" );
else
perror( "Error renaming file" );
return 0;
}
其实就是一个函数rename,重命名作用的。希望能帮到你,谢谢,满意的话就采纳吧