I already have the code that will copy over any files listed in a listbox but i just need help on how to adapt it to also copy over directories.
Ex. of Listbox
- Z:\Test\TestFile.exe
- Z:\Test\TestFolder
This is the code i have so far... thank you in advance
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