Home Forums .NET libraries Xceed SFTP/FTP for .NET Help With xceed ftp Needed [Please Read!]

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21312 |

    Hi Everyone Out there

    i really need help with something guys. what i need to know is how to connect to an ftp by providing its hostname, pass and username

    and i also want to no know is how to download a file from my ftp to my pc harddrive

    im using visual basic 2008 if you could give me the code that would be great

    what im trying to do is making a downloader

    Like this Picture

    downlaoder

    so like lets say i wanted to get test.txt from my ftp

    so when i hit download button it will connect to my ftp by providing its hostname, password and username because i also dont know how to make it connect and and then start downloading test.txt. 

    Many Thanks a code sample for visual basic 2008 will do.

    Jack

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by home (had 924 views)

    Xceed Support
    Member
    Post count: 5658

    Hi,

    You can Connect to an ftp server like this:

    Dim hostname As String = http://ftp.xceed.com

    Dim connection As New FtpConnection(hostname)

    To download your file “test.txt”:

    Dim starting As AbstractFolder = New FtpFolder(connection)

    Dim destination As AbstractFolder = New DiskFolder(localFolder)

    Dim sourceFile As AbstractFile = starting.GetFile(“test.txt”)

    sourceFile.CopyTo(destination, True)

    connection.dispose()

     

     

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Alain [Xceed] (had 1301 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.