15,440
社区成员
发帖
与我相关
我的任务
分享
try
{
CFile::Rename(strSrc, strNew);
}
catch(CFileException* pEx )
{
nRet=pEx->m_cause;
TRACE(_T("File %20s not found, cause =%d\n"), strSrc,pEx->m_cause);
pEx->Delete();
}
for (int i=0;i<Files.size();i++)
{
CString str;str.Format(_T("%d"),i);
CString pNewName=FilePathstr+m_prefix+str+_T(".")+m_fileex;//FilePathstr是路径 m_prefix是前缀 str是编号 m_fileex是扩展名
FileFlase=RenameFile(Files[idx[i]], pNewName);
}