I have 2 textbox, 2 OpenFolderDialog, and 3 buttons.
Here the following code I have so far
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FolderBrowserDialog1.ShowDialog()
TextBox1.Text = FolderBrowserDialog1.SelectedPath
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
FolderBrowserDialog2.ShowDialog()
TextBox2.Text = FolderBrowserDialog2.SelectedPath
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim path As String = TextBox2.Text
Dim destination As String = TextBox1.Text
For Each hfile In Directory.GetFiles(path)
File.Copy(path & "/" & hfile, destination)
Next
End Sub
End Class
So I'm really stuck at this moment, I want to move all the file in TextBox2 to TextBox1 but it doesn't really copy and move it.

New Topic/Question
Reply




MultiQuote





|