Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Oct 2004

    Question Deleting a folder

    Dear friends

    I am using series 60 sdk fp2 with MSVC++ 6.0

    I am writing a application where I am creating and deleting a folder.

    I am able to sucessfully create a folder but when i am not able to delete it.

    I tried using both RFs fsSession and CFileMan *fileMan

    when i used the RFs fsSession to delete a folder it returns me sucess but the folder not deleted(I Made sure that folder was empty).

    when i use CFileMan *fileMan it returns me the error code saying Acccess Denied but deletes the inside contents of the file.

    Here is the code i used for both types

    For CFileMan *fileMan

    CFileMan *fileMan

    eRet1 = fileMan->RmDir(*poDirPathBuf) ;

    For RFs fsSession

    RFs fsSession ;

    User::LeaveIfError(fsSession.Connect()); // connect session
    TRAP (err, fsSession.RmDir(*pbDeleteFolder)) ;
    if(KErrNone != err)
    User::Leave (err);

    Can I know what is the problem?

    Thanks in advance

    Vinayaka Karjigi

  2. #2
    Registered User
    Join Date
    Aug 2005

    Re: Deleting a folder

    how did u give the path.
    it should be "c:\\system\\apps\\MyApp\\Foldernametodelete\\"
    the trailing "\\" is needed to make it identifiable as a folder otherwise it is identified as a file.

    try this

    TBuf<256> sourcefolderpath;

    RFs fsSession;
    TInt err=fsSession.RmDir(sourcefolderpath);


Similar Threads

  1. Game directly to Game Folder
    By JPurd in forum Mobile Java General
    Replies: 4
    Last Post: 2008-04-15, 20:34
  2. sms folder problem
    By psi1983 in forum Symbian
    Replies: 3
    Last Post: 2006-07-13, 08:49
  3. Replies: 1
    Last Post: 2003-10-14, 13:47
  4. How to automatically copy files from soruce folder to BUILD folder
    By etccoch111 in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2003-10-14, 09:13
  5. Replies: 0
    Last Post: 2003-10-14, 04:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts