【发布时间】:2016-01-22 00:17:44
【问题描述】:
我已经有了可以复制列表框中列出的任何文件的代码,但我只需要有关如何调整它以复制目录的帮助。
例如。列表框的
- Z:\Test\TestFile.exe
- Z:\Test\TestFolder
这是我到目前为止的代码......提前谢谢你
For Each item As String In FilesList.Items
Try
If IO.File.Exists(item) Then
My.Computer.FileSystem.CopyFile(item,
FolderChosenText.Text & "\" & IO.Path.GetFileName(item))
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Next
【问题讨论】: