vb.net - VB.NET 如何删除便携式设备中存在的文件夹
问题描述
我已使用 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_05c6&pid_9039&mi_00#7&105d921&0&0000#{6ac27878-a6fa-4155-ba85-f98f491d43 {10001,,11280285696}{00000056-0001-0001-0000-000000000000} '。
路径是使用以下方法获得的:
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()
请帮忙
解决方案
推荐阅读
- angular - 如何使用密钥将登录凭据加密为 base64
- android - 如何使用 Framework7 为 Android 5 构建?
- git - 使用分叉和拉取请求进行协作
- swift - 如何在 XCTestCase 中的 viewModel 中正确测试通过发布者更改的 var
- pandas - 插值然后外推边界值
- mysql - 如何只返回一列中的不同结果,同时允许其他列中的重复?
- python - 使用存储单元创建表
- php - php 变量范围 - 包含/必需的脚本与 ajax
- javascript - Handlebars:访问已被拒绝解析“来自”的属性,因为它不是其父级的“自己的属性”
- python-3.x - 在使用 iterrows 进行迭代时比较数据框中的两个值