diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-00DE7E90-4C6B-577A-85E1-76698CA2AB69.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-00DE7E90-4C6B-577A-85E1-76698CA2AB69.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,17 @@ + + + + + +How to move a file

You can move a single file to a different directory without renaming it, using RFs::Rename().

+// Move file.txt from dir1 to dir2 +_LIT(KFileSource,"\\dir1\\file.txt"); +_LIT(KFileTarget,"\\dir2\\file.txt"); +User::LeaveIfError(fsSession.Rename(KFileTarget,KFileSource)); +
Notes
  • RFs::Replace() can also be used to move a file. The difference between the two functions is that Rename() will return an error if a file with the new name already exists in the target directory whereas Replace() will overwrite it. Another way to move files is to use CFileMan::Move(). This may be used to move multiple files.

\ No newline at end of file