我有一个路径 D:\myfolder1\mysubfolder 我想将 mysubfolder 移动到根目录(D:) 这是我尝试使用的代码,它给了我一个错误,说参数无效。
Public Sub Movefolder()
Dim listFolders() As String = Directory.GetDirectories("D:\myfolder1")
Dim curf As String
For Each curf In listFolders 'listfolders(1) would be the mysubfolder
Dim DirInfo As New System.IO.DirectoryInfo(curf)
Directory.Move(curf, "D:\") 'This is where I get the error
Next
End Sub
任何人都可以指出我做错了什么,或者有更简单或至少另一种方法吗?