可以利用WINDOWS的API函数进行操作,MoveFile  或MoveFileEx
他们可以同时对文件和文件夹改名,只要移动到同一个目录下,同时换名即可
BOOL MoveFileEx(
  LPCTSTR lpExistingFileName,  // pointer to the name of the existing file
  LPCTSTR lpNewFileName,       // pointer to the new name for the file
  DWORD dwFlags                // flag that specifies how to move file
);
 BOOL MoveFile(
  LPCTSTR lpExistingFileName, // pointer to the name of the existing file
  LPCTSTR lpNewFileName       // pointer to the new name for the file
);
 MoveFile("c:\a","c:\b")
将C:下的目录a该名为b