3
Answers

delete a directory even if someone using the file

Ask a question
darma teja

darma teja

11y
1.1k
1
Hi all,

In my application, i written a code to delete a folder.

Here is the code: Directory.Delete(folderpath, true); 

The problem is that: If some one is opened or using the file in the same folder, It gives me exception. 

Is there any possibility to delete a folder even if some one using the files in the folder.


Thanks allot!

Darma

Answers (3)