I created a program to upload any file on my ftp server. Is there any way i can modify this code to create a new directory (for example a directory named "images") and then upload the file to that directory?
Public Class ftpuploader1
Private Sub UploadButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UploadButton.Click
Try
My.Computer.Network.UploadFile(TextBox3.Text, ftp.Text + ftplink.Text + "/" + Label5.Text, TextBox1.Text, TextBox2.Text, True, 500)
Catch ex As Exception
MsgBox(ex.Message)
End Try
TextBox4.Text = "http://" + link.Text + "/" + Label5.Text
End Sub
Private Sub BrowseFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BrowseFile.Click
OpenFileDialog1.ShowDialog()
OpenFileDialog1.Title = "Chose a File"
TextBox3.Text = OpenFileDialog1.FileName
Label5.Text = OpenFileDialog1.SafeFileName
End Sub
End Class
Basicaly i want to know how i could create a new directory on the ftp server from this program itself and den upload the file to the directory that i created
Please help! Thanks

New Topic/Question
Reply




MultiQuote




|