File Copy

Login to reply to this topic.
Thu, 2008-04-17 08:49
Joined: 2008-03-11
Forum posts: 44

Hi
All
I am new in symbian and what to Copy a file which is exists on drive into new created file by RFILE ifile.

code for creating file is as:

void CViewAppAppUi::MediaFileL()
{

TBuf<32> iBuf;
iBuf.Copy(_L("C:\\Nokia\\Sounds\\bb.wav"));
User::LeaveIfError(ifs.Connect());
TInt val = iFile.Replace(ifs,iBuf,EFileRead | EFileWrite);

if(val==KErrNone)
{

//

}

}

ple help me how i can copy data one file to another file

Satish Khatri


Thu, 2008-04-17 09:19
Joined: 2003-12-05
Forum posts: 672
Re: File Copy

If you just want to copy the file to another place, use CFileMan::Copy. If you want to move the file, use RFs::Rename.

If you want to copy the contents of the file and append/replace it to another file, then you need to open both, read data from the first, and write to the second (if appending, Seek first to the end).

Thu, 2008-04-17 09:23
Joined: 2007-11-29
Forum posts: 31
Re: File Copy

[edit] arg, what he said.

  • Login to reply to this topic.