Polas5
Member
Hello.
Here I have a small problem with ftp upload all files and subfolders.
Here is my code.
The program is well-checked everything but how do I upload all files and subfolders?
Here I have a small problem with ftp upload all files and subfolders.
Here is my code.
VB.NET:
Private Sub Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OpenFileDialog1.ShowDialog ()
TextBox1.Text = OpenFileDialog1.FileName
Label3.Text = OpenFileDialog1.SafeFileName
end Sub
Private Sub Button3_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
My.Settings.host = TextBox2.Text
My.Settings.username = TextBox3.Text
My.Settings.password = TextBox4.Text
My.Settings.Save ()
My.Settings.Reload ()
try
My.Computer.Network.UploadFile (TextBox1.Text, "ftp://ftp. TextBox2.Text & &" / "+ Label3.Text, TextBox3.Text, TextBox4.Text, True, 500)
Catch ex As Exception
MsgBox (ex.Message)
end Try
end Sub
Private Sub Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox2.Text = My.Settings.host
TextBox3.Text = My.Settings.username
TextBox4.Text = My.Settings.password
end Sub
The program is well-checked everything but how do I upload all files and subfolders?