|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Deleting a folderI 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? "BobRoyAce" <b***@omegasoftwareinc.com> schrieb: 'My.Computer.FileSystem.DeleteDirectory'.>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? -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Yea, that would make sense...thanks. I looked for DeleteFolder...never
even looked for DeleteDirectory! Herfried K. Wagner [MVP] wrote: Show quoteHide quote > "BobRoyAce" <b***@omegasoftwareinc.com> schrieb: > >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'. > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Hi BobRoyAce,
I tried Try System.IO.Directory.Delete("C:\test", True) Catch ex As Exception MsgBox(ex.message.tostring) End Try Have a look at http://msdn2.microsoft.com/en-us/library/fxeahc5f.aspx for more information Best regards, Chris Show quoteHide quote "BobRoyAce" <b***@omegasoftwareinc.com> wrote in message news:1157501838.537881.86290@h48g2000cwc.googlegroups.com... >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? >
Registry Reading
Remove certain characters from a string/RichTextBox? [Regular Expression] extraction when bounds are vbCr and vbLf Better way to process many conditions with If Then Crystal Reports in VB.NET Determining max number of characters in a TextBox datagridview.SelectedRows returns last row first? Break up string, Comma Delimited Intellisense XML Comments / Documentation SQL Server |
|||||||||||||||||||||||