I have a listbox with a bunch of paths listed in it. when a button is click it goes to each of the directories and copies the files to the destination location.
As each dicretory is copied I want the item to be removed from the list box but it seem i'm not doing something right in my code.
The second issue is it possible to get the directory name of wher the files are being copied from and create that directory at the destination location? Thanks for all the help.
Code:ToolStripStatusLabel1.Visible = True For Each itm As String In Me.ListBox1.Items ToolStripStatusLabel1.Text = itm My.Computer.FileSystem.CopyDirectory(itm & "\", ComboBox1.Text) ListBox1.Items.Remove(itm) Next MsgBox("File Copy Complete.", MsgBoxStyle.OkOnly, "Copy Complete")




Reply With Quote