I am in the process of creating an application that runs in the background and performs several tasks and works as a server. At a point in my application I have it write some files to a directory of the user's choice.
The only problem that I encounter is that I get this error when the user tries to delete that directory later:
"Cannot delete folder: It is being used by another person or program."
The only way to remedy the problem is by shutting down the server application but this is not favorable. Is there any other API or method to get my application to release its "lock" on the directory it wrote the file to?
Thanks in advance!
Code:
Dim TextString As String TextString$ = txtSave Open Path$ For Output As #1 Print #1, TextString$ Close #1
"Cannot delete folder: It is being used by another person or program."
The only way to remedy the problem is by shutting down the server application but this is not favorable. Is there any other API or method to get my application to release its "lock" on the directory it wrote the file to?
Thanks in advance!
Comment