Any API to Rename a file with the new Drive.
| Wed, 2005-09-28 12:11 | |
|
Hi All,
I want to rename a file, present in c drive. The new name is containing the different drive name. Lets say the file is present at C:\\test.xyz, now i want to rename it to F:\\my.xyz. Is there any API to do the same?? RFs and RFile's Rename() function can not change the drive. Please help me out Thanks Pinky |
|






Forum posts: 1379
Which is the same thing as rename.
didster
Forum posts: 35
~Pinky
Forum posts: 15
try this Dude........
_LIT(KFilePathOldRename,"\\System\\Test.txt");
_LIT(KFilePathNewRename,"\\System\\Test123.txt");
TBool CLFileAll::Rename(const TDesC &anOldName,const TDesC &aNewName)
{
RFs iFs;
iFs.Connect();
TInt iErr=iFs.Rename(anOldName,aNewName);
iFs.Close();
if(iErr==KErrNone)
return ETrue;
else
return EFalse;
}
works fir me, hope it works for you too.
Gud Luck.