Unable to delete folder using unc path

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I am trying to use a unc path to delete a folder from my own machine but Im getting an "Authorized" error. If I change it to a non-unc path it works file.

This works: My.Computer.FileSystem.DeleteDirectory("C:LibraryLibrary_EnvironmentE_ContentCONTENTyeufxbgrhcdeopjhmqbmdjakvoarhfxd", FileIO.DeleteDirectoryOption.DeleteAllContents)

But this does not work:
My.Computer.FileSystem.DeleteDirectory("\Vic-Win7CLibraryLibrary_EnvironmentE_ContentCONTENTyeufxbgrhcdeopjhmqbmdjakvoarhfxd", FileIO.DeleteDirectoryOption.DeleteAllContents)

Can anyone tell me how to use a unc path when deleting files or folders from my own machine?

Thanks,

Vic
<hr class="sig Visual Basic; Access; PHP; SQL Server; MySQL Developer

View the full article
 
Back
Top