要求:对指定文件夹及其子文件夹下面的指定格式的文件进行重命名
实现代码:
void Picsort(string filename){
/*string filename = R"(D:\天文台汇总\fast自测数据\matlab\新建文件夹)";*/ofstream fout;
int count = 0;
_finddata_t fileInfo;
string Filename = filename + "\\*.tif";
long handle = _findfirst(Filename.c_str(), &fileInfo);
if (handle == -1){
cerr << "can not match the folder path" << endl;
exit(-1);
}
do{