Hi guys,
I have been having a problem deleting a directory, the code i use is:
and the intermediate window shows:
i then tried:
and it worked YAY, next i wanted to delete a directory inside a directory so i used:
But this now throws up:
and its the same drive with the same permissions and Visual Studio is running in Administrator also??
Any Ideas anyone ????
I have been having a problem deleting a directory, the code i use is:
VB.NET:
My.Computer.FileSystem.DeleteDirectory("W:\New One", FileIO.DeleteDirectoryOption.DeleteAllContents, FileIO.RecycleOption.DeletePermanently)
and the intermediate window shows:
A first chance exception of type 'System.ComponentModel.InvalidEnumArgumentException' occurred in Microsoft.VisualBasic.dll
i then tried:
VB.NET:
IO.Directory.Delete("W:\New One", True)
and it worked YAY, next i wanted to delete a directory inside a directory so i used:
VB.NET:
IO.Directory.Delete("W:\New Folder\New One", True)
But this now throws up:
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
and its the same drive with the same permissions and Visual Studio is running in Administrator also??
Any Ideas anyone ????