Deleting a folder

B

BobRoyAce

I am using Visual Studio .NET 2005 to create a Windows Forms
application. I know that I can use My.Computer.FileSystem.DeleteFile to
delete a file. How do I delete an empty folder/directory though? How
could I delete a folder that wasn't empty?
 
H

Herfried K. Wagner [MVP]

BobRoyAce said:
I am using Visual Studio .NET 2005 to create a Windows Forms
application. I know that I can use My.Computer.FileSystem.DeleteFile to
delete a file. How do I delete an empty folder/directory though? How
could I delete a folder that wasn't empty?

'My.Computer.FileSystem.DeleteDirectory'.
 
B

BobRoyAce

Yea, that would make sense...thanks. I looked for DeleteFolder...never
even looked for DeleteDirectory!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top