Does framework have any FTP functionality built in? Any resources/articles? Thnx (n/t)

Discussion in 'ASP .Net' started by Kikoz, Jul 20, 2004.

  1. Kikoz

    Kikoz Guest

    n/t means "no text"
     
    Kikoz, Jul 20, 2004
    #1
    1. Advertisements

  2. Kikoz

    ASP.Confused Guest

    ASP.Confused, Jul 20, 2004
    #2
    1. Advertisements

  3. What you're pry wanting, no. FTP is based on simple networking over a
    known port, using certain commands. So the pieces are there, but a client
    library, for example, is not built for you to handle the protocol portion
    of FTP. This is common to Java and other languages as well.

    You could easily find third-party components to do this, although they are
    pry not free, but you could check around. Otherwise, it's not that hard
    to build your own class library to do this.
     
    Craig Deelsnyder, Jul 20, 2004
    #3
  4. Ken Cox [Microsoft MVP], Jul 21, 2004
    #4
  5. Kikoz

    Joe Fallon Guest

    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
     
    Joe Fallon, Jul 21, 2004
    #5
  6. Kikoz

    Kikoz Guest

    THANKS GYUS!!
     
    Kikoz, Jul 21, 2004
    #6
  7. Try this:
    http://www.indentix.com/ftp.html

    The FTP component implements a standard FTP client as specified in RFC
    959 and supports both the synchronous and asynchronous programming.
    This component includes everything required of a modern FTP client
    including the ability to restart interrupted transfers, firewall and
    proxy support, and easy-to-use methods for sending custom commands and
    receiving the server responses.
     
    Indentix, Inc., Jul 27, 2004
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.