Shiny
Shiny

Reputation: 1083

How to delete files ,subdirectory entirely to specified path

I have created directory and its subdirectory and files... I have to delete them entirely. Is there any possible ways.How can i achieve this

Upvotes: 2

Views: 223

Answers (3)

Anton Gogolev
Anton Gogolev

Reputation: 115877

I guess,

Directory.Delete(path, true /* recursive */);

will do the job.

Upvotes: 0

Directory.Delete(path, true);

http://msdn.microsoft.com/en-us/library/fxeahc5f.aspx

Upvotes: 1

Adam Houldsworth
Adam Houldsworth

Reputation: 64547

Directory.Delete("the dir", true);

http://msdn.microsoft.com/en-us/library/fxeahc5f.aspx

Upvotes: 4

Related Questions