centos中C环境码代码移动大量文件

来源:互联网 发布:线切割五角星编程 编辑:程序博客网 时间:2024/06/10 06:41

在linux系统纯c环境中

#include <stdio.h> //加载头文件

int rename(const char *oldname, const char *newname);  //函数声明

举例使用:

test.cpp、test.txt与home文件夹放在同一目录下,那么如果想通过test.cpp将test.txt放入home文件夹,

则:: rename("test.txt",“home//test.txt");


0 0