×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    9

    Deleting a Folder in use

    Hi

    look at this code:


    TBuf<256> kDirToDelete;
    _LIT(kDirName, "C:\\try");
    kDirToDelete.Copy(kDirName);
    folderExplorer->deleteDirL(kDirToDelete);



    void CSymbianClientFolderExplorer::deleteDirL(const TDes& kDirToDelete)
    {
    RFs fsSession;

    // Connect to the file server
    fsSession.Connect();
    CleanupClosePushL(fsSession);

    // Delete a folder
    User::LeaveIfError(fsSession.RmDir(kDirToDelete));

    // Close the connection with the file server
    CleanupStack::PopAndDestroy(1);
    }


    When i use it to delete a folder i even get the message "In use by another application (-14)". That appens in any case, both on the Epoc32 Emulator that on my Phone Nokia 6680.
    State that the directory is closed and empty. I also tryed unmount the file system but the directory couldn't be removed because in use! All application all obviusly closed.

    Note that the directory i want to delete is a simple folder created by me with only for try that is: C:\\try
    Note also that i manage to remove any files without any problem with a similar code.


    Can someone help me to understeand why? how i can delete a dir?

  2. #2
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Deleting a Folder in use

    Note that you should use a trailing backslash: "C:\\try\\"

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    9

    Re: Deleting a Folder in use

    thanks, now it work

Similar Threads

  1. sms folder problem
    By psi1983 in forum Symbian
    Replies: 3
    Last Post: 2006-07-13, 08:49
  2. Deleting a folder
    By vinayakak in forum Symbian
    Replies: 1
    Last Post: 2006-03-20, 09:21
  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: 2002-09-27, 06:55

Posting Permissions

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