genc ymeri wrote:
Hi over there,
What command should I run to delete folders even if theirs subfolders are
not empty with files ?????
Thanks in advance.
"subfolders are not empty with files" is not a problem of
"Directory.Delete(..,true)".
"Directory.Delete(..,true)" raises exception if some file/subfolder in
the folder cannot be deleted.
For example,
some files in the folder are marked as readonly,
some file/folder has been opened by other applications,
current user has no permission to delete the files/folders,
etc.
In such case, you shold catch the exception and prompt it to user to handle.
--
Jacky Kwok
ja***@alumni.cuhk.edu.hk ja***@compose.com.hk