The instructions from our vendor require us to upload files using the following command in MS DOS FTP: PUT filename CUSTOMER_UPLD!FTP

Here's my attempt to do this using the rebex ftp component, but I get a 450 error returned: File Not Available. Please advise on how this command (CUSTOMER_UPLD!FTP) can be sent with the PutFile method of the ftp object. If the command is not sent, then the files just sit in the inbound directory of the remote server (likely a mainframe since it won't allow batch uploads) and are not picked up.

Sub UploadFTPFiles(ByVal LocalDir As String, ByVal User As String, ByVal Psw As String, ByVal Server As String, ByVal Port As Integer, ByVal FilePath As String)
    Dim client As New Ftp
    Dim FileDir As New DirectoryInfo(LocalDir)
    Dim fiClaimFiles() As FileInfo
    Dim fi As FileInfo
    Dim sArchPath As String

    AddHandler client.CommandSent, AddressOf client_CommandSent
    AddHandler client.ResponseRead, AddressOf client_ResponseRead

    With client
        .Connect(Server, Port)
        .Login(User, Psw)
        .TransferType = FtpTransferType.Binary
        .Passive = False
        fiClaimFiles = FileDir.GetFiles
        For Each fi In fiClaimFiles
            .PutFile(fi.FullName, FilePath + fi.Name + " CUSTOMER_UPLD!FTP")

            'Archive the file if sent successfully
            sArchPath = LocalDir + "Archive\" + fi.Name

            fi.MoveTo(sArchPath)
        Next
        .Disconnect()
    End With
End Sub

asked 06 Jan, 03:24

DBA_Jeremy's gravatar image

DBA_Jeremy
251
accept rate: 0%

Can you please send us the log file to support@rebex.net (it can be produced as described at http://www.rebex.net/kb/logging.aspx). It should contain the command sent to the server and the error response. We can tell more with this information.

(06 Jan, 18:11) Lukas Matyska ♦♦
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×152
×15
×7

Asked: 06 Jan, 03:24

Seen: 127 times

Last updated: 06 Jan, 18:11