darma teja

darma teja

  • NA
  • 496
  • 337.5k

delete a directory even if someone using the file

May 23 2013 4:43 AM
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)