Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VB.NET如何删除便携设备中存在的文件夹_Vb.net_Delete Operator - Fatal编程技术网

VB.NET如何删除便携设备中存在的文件夹

VB.NET如何删除便携设备中存在的文件夹,vb.net,delete-operator,Vb.net,Delete Operator,我已使用Shell32.Shell将文件夹从计算机复制到便携式设备 Dim SrcPath = "my path" Dim tmpShell As Shell Dim tmpFolder As Folder Dim destinationPath As String destinationPath = "destinationpath here" ' destinationPath = "::{20D04FE0-3AEA-1069-A2D8-

我已使用Shell32.Shell将文件夹从计算机复制到便携式设备

Dim SrcPath = "my path"
Dim tmpShell As Shell
Dim tmpFolder As Folder
Dim destinationPath As String

destinationPath = "destinationpath here"
' destinationPath  = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_05c6&pid_9039&mi_00#7&105d921&0&0000#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SID-{10001,,11280285696}\{00000056-0001-0001-0000-000000000000}"

' because it is coming from tmpShell.BrowseForFolder in another function

tmpShell = New Shell

tmpFolder = tmpShell.NameSpace(destinationPath)
tmpFolder.CopyHere(SrcPath)
现在还可以,但我想删除这个文件夹“:{20D04FE0-3AEA-1069-A2D8-08002B30309D}”?\usb\vid#u 05c6&pid#9039&mi#00#7&105d921&0&0000{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SID-{10001,11280285696{00000056-0001-000000>

路径是通过以下方式获得的:

Dim tmpShell As New Shell
Dim tmpFolder As Folder
tmpFolder = tmpShell.BrowseForFolder(0, "Choose the device iternal storage folder", 0, 0)
dim the path = tmpFolder.Items.Item.Path
我不能用

IO.File.Delete()

请帮助

查看:否无效,相同的异常消息{“路径不是合法形式。”}您是如何生成该文件夹的路径的?将tmpShell设置为新Shell将tmpFolder设置为文件夹tmpFolder=tmpShell.BrowseForFolder(0,“选择设备内部存储文件夹”,0,0)dim the path=tmpFolder.Items.Item.path看起来包含您需要的信息。我没有可以试用的便携设备。请看:不,不起作用,相同的异常消息{“路径不是合法形式的。”}您是如何生成该文件夹的路径的?将tmpShell设置为新Shell Dim tmpFolder设置为folder tmpFolder=tmpShell.BrowseForFolder(0,“选择设备内部存储文件夹”,0,0)dim the path=tmpFolder.Items.Item.path看起来包含您需要的信息。我没有一个便携式设备,我会尝试它。