|
-
Jul 26th, 2013, 05:19 PM
#1
Thread Starter
Addicted Member
files names in a folder off a server
I commonly use the following code to download a specific file off a server.
My.Computer.Network.DownloadFile _
("http://www.xxx.com/mlm_buyers/new_download_log.txt", "C:\xxx\mlm_buyer_followup\new_mlm_buyers_download_log.txt", "", "", True, 1000, True)
How do I retrieve all the files names in a folder off a server?
-
Jul 26th, 2013, 05:26 PM
#2
Thread Starter
Addicted Member
Re: files names in a folder off a server
I use this code to logon and upload files to my server.
Public Function ftp_file(ByRef username As String, ByRef password As String, ByRef server_file As String, ByRef local_path_file As String)
Try
Dim request As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(server_file), 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(local_path_file)
Dim strz As System.IO.Stream = request.GetRequestStream()
strz.Write(file, 0, file.Length)
strz.Close()
strz.Dispose()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Function
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|