Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CFile::Rename
CFile                                       Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  static void Rename( const char* pszOldName, const char* pszNewName )
  throw( CFileException );
 
  Parameter    Description
 
  <pszOldName> The old path.
 
  <pszNewName> The new path.
 
  Remarks
 
  This static function renames the specified file. Directories cannot be
  renamed. This is equivalent to the MS-DOS ren command.
 
  Example
 
  extern char* pOldName;
  extern char* pNewName;
  TRY
  {
      CFile::Rename( pOldName, pNewName );
  }
  CATCH( CFileException, e )
  {
     #ifdef _DEBUG
        afxDump << "File " << pOldName << " not found, cause = "
               << e->m_cause << "\n";
     #endif
  }
  END_CATCH
 
 
 
                                     -♦-