FTP in VB.NET

  • Thread starter Thread starter Vijay Balki
  • Start date Start date
V

Vijay Balki

I am looking for links.. tips.. articles that explain how to implement FTP
in VB.NET, this should help me upload files to a specific location on server

Thanks
VJ
 
VJ,
Matthew MacDonald's book "Microsoft Visual Basic.NET Programmer's Cookbook"
from MS Press has a topic that shows how to create an FtpClient with VB.NET.

Hope this helps
Jay
 
Thanks guys.. I am looking into them. I will ask if I have any more
questions

VJ
 
http://www.gotdotnet.com/Community/...mpleGuid=DD5E4A38-7F5B-45E0-9C36-64B987947C20

This is an excellent ftp class.

Sample code:

Dim objFTP As New FTP
Dim myDir, NewPath As String

myDir = Path.GetDirectoryName(strFullPath) & "\"

'rename existing file before downloading new copy
If File.Exists(strFullPath) = True Then
NewPath = myDir & Format(Now(), "yyyyMMddHHmmss") & " " &
Path.GetFileName(strFullPath)
're-name the file
File.Move(strFullPath, NewPath)
End If

objFTP.RemoteHost = strSite
objFTP.RemotePath = strSiteDir
'slashes are optional at beginning and end of RemotePath!
objFTP.RemoteUser = strUID
objFTP.RemotePassword = strPwd
objFTP.RemotePort = 21

If objFTP.Login() = True Then
objFTP.SetBinaryMode(True)
objFTP.DownloadFile(strSiteFileName, strFullPath)
'if file exists, it is overwritten without warning.
End If
 
Hello,

Vijay Balki said:
I am looking for links.. tips.. articles that explain how to implement
FTP in VB.NET, this should help me upload files to a specific
location on server

In addition to my previous post:

There is a nice (commercial) FTP component available at
http://www.abderaware.com/.
 
Thanks guys.. the below links was really helpful in Integrating FTP to a VB
or C# clients I have.

VJ
 
Back
Top