Announcement

Collapse
No announcement yet.

Delete folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Delete folder

    Hello,
    I have a little problem and hope that one can help me! I would like to delete a previously created folder after installation of the setup which unfortunately does not succeed!

    Folder.DeleteTree ("C:\\my folder", nil);
    Folder.Delete ("C:\\my folder");

    1. DeleteTree deletes the contents but not the folder itself!
    2. Delete does not even delete the empty folder!


    What am I doing wrong or how the command would be "my folder" deleted?


    For the trouble I thank in advance
    kampen

  • #2
    I suspect that the folder is not empty when you attempt to delete it. The error code / message you see in the log file explains what is happening, you should check it. You cannot delete a file when it is in use (running or open), for example, so a folder containing a file in use also cannot be deleted.

    Ulrich

    Comment


    • #3
      Many Thanks,
      For the fast response Ulrich!

      I just checked it!
      The My folder does not contain any other folders / files and therefore the question is why my folder is not deleted?
      Can it be that the error has to do with the deletion of the content and is thereby active and thus not deleted?

      Comment


      • #4
        What is the error code in the log?

        Ulrich

        Comment


        • #5
          Hello Ulrich,

          Thanks for the note of the "use" because that is / could be the error since the delete or remove the folder with the creation setup should be done!
          I have now bypassed this by using a small application to delete with what has been done after a restart!

          Many Thanks
          kampen

          Comment

          Working...
          X