Hi, i can't figure out how to upload and download all the .txt and .jpg files
I've tried this code:
But it gives an error "Illegal character in path" on this line:
I've tried this code:
Code:
Dim request As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(host & "*.jpg"), System.Net.FtpWebRequest)
request.Credentials = New System.Net.NetworkCredential(username, password)
request.Method = System.Net.WebRequestMethods.Ftp.UploadFile
Dim file() As Byte = System.IO.File.ReadAllBytes(MainFolder & "*.jpg")
Dim strz As System.IO.Stream = request.GetRequestStream()
strz.Write(file, 0, file.Length)
strz.Close()
strz.Dispose()
Code:
Dim file() As Byte = System.IO.File.ReadAllBytes(MainFolder & "*.jpg")