Login  
Search All Forums
Dart Home | PowerTCP FTP for ActiveX | Custom Development Reply | PowerTCP FTP for ActiveX Topics | Forums   
AuthorForum: PowerTCP FTP for ActiveX
Topic: Corrupt FTP Files
marcuskilgour
marcus@webskyltd.com

From: Bath, England
Posts: 1
Member Since: 07/07/06
posted July 9, 2006 2:00 PM

Whn uploading files to a server via PowerTCP FTP, the file that has been transferred to the remote server is truncated. No exceptions are thrown, and the FTP component registers that the file was transferred correctly. Here's the code I am using to upload the file; can anyone spot what I'm doing wrong before I tear the rest of my hair out! Many thanks.

Try
        Dim oFTP As New Dart.PowerTCP.Ftp.Ftp
        Dim files As Dart.PowerTCP.Ftp.FtpFile

        oFTP.Server = "ftp.validftplocation.com"
        oFTP.Passive = False
        oFTP.Username = "xxx"
        oFTP.Password = "xxx"

        files = oFTP.Put("D:\Portals\Processed\Look4\ExpertAgent.zip", "/data/ExpertAgent.zip")

        If (files.Exception Is Nothing) Then
          writeToLogFile("Look4 File: " & files.LocalFileName & " Transferred Successfully!")
        Else
          writeToLogFile("***Error With Look4 File: " & files.LocalFileName & " " & files.Exception.Message)
        End If

        files = oFTP.Put("D:\Portals\Processed\Look4\EA_Photos.zip", "/pictures/EA_Photos.zip")

        If (files.Exception Is Nothing) Then
          writeToLogFile("Look4 File: " & files.LocalFileName & " Transferred Successfully!")
        Else
          writeToLogFile("***Error With Look4 File: " & files.LocalFileName & " " & files.Exception.Message)
        End If

        Try
          oFTP.Connection.Close()

          oFTP.Dispose()

        Catch ex As Exception
          writeToLogFile("Look4: Error disconnecting from FTP: " & ex.Message)
        End Try
      Catch ex As Exception
        writeToLogFile("Look4: Unspecified Error With FTP: " & ex.Message)
      End Try
Raj

From: Rome, NY, USA
Posts: 389
Member Since: 02/01/06
posted July 10, 2006 11:43 AM

I have sent an e-mail response to this case, please check the same.

Thanks,
Raj
Reply | PowerTCP FTP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX