i need help to rename file using C with more than 8 character.
why rename function cannot take more than 8 charcter,is it because
DOS is not able to do the same.
am i correct?
Edited by chetan21, 25 May 2009 - 05:29 PM.
Edited by chetan21, 25 May 2009 - 05:29 PM.
|
|
|
#include <windows.h> MoveFile(src,dest);
#include <iostream>
#include <fstream>
using namespace std;
ifstream ifsOldFile( szOldPath );
ofstream ofsNewFile( szNewPath );
char cBuf[ 1024 ];
do {
ifsOldFile.read( cBuf, 1024 );
ofsNewFile.write( cBuf, 1024 );
} while( !ifsOldFile.eof( ) );
ifsOldFile.close( );
ofsOldFile.close( );
//do something to delete the file at szOldPath