文件重新命名

文件重新命名
  extern   TCHAR*   pOldName;  
  extern   TCHAR*   pNewName;  
   
  try  
  {  
          CFile::Rename(   pOldName,   pNewName   );  
  }  
  catch(CFileException*   pEx   )  
  {  
  #ifdef   _DEBUG  
          afxDump   <<   "File   "   <<   pOldName   <<   "   not   found,   cause   =   "  
                          <<   e->m_cause   <<   "\n";  
  #endif  
          pEx->Delete();  
  }  
或者 MOVE FILE

你可能感兴趣的:(文件重新命名)