I use OpenFileDialog()
in my Silverlight application. When I select a file using ShowDialog()
it simply locks the file until I close my application.
I am not able to rename or delete the folder when the application is running (silverlight application in browser)
If I try to select any other file in any another folder, I am able to rename the previous folder. It seems it is releasing the handle.
My goal: I want to rename/delete the folder in filesystem (manually) once I finished uploading.
I know it is not possible to point OpenFileDialog()
to some other folder from code. Any pointers?
Btw, this is the windows error message:
The action can't be completed because the folder is open in another program. Close the folder and try again.