• 03 Sep

    Can’t open data connection for ftp transfer

    Can’t open data connection for ftp transfer

    Q: I’m using the attached FTP source that I have set to get files, but I’m getting an error when reading the directory. I’m able to access the folder using Cyberduck fine with the same settings. Below is the log showing the response I get.  I’m using v2024.2.24.0. Please let me know if you need anything else to troubleshoot.

    A: It looked like the system was not able to open a data connection to the FTP server (425 Can’t open data connection for transfer) and we asked the user to switch be to ‘Active’ mode. FTP is using two channels, a command and a data channel. So if you are able to connect, then you know at least the command channel is working. If you are not able to receive directory listings, then you know something is wrong with the data channel. The data channel can be used in active and passive mode (passive mode = default).

    Reply user: “That seemed to work. Thank you.”

    Connecting to ftp_useast.xxxxxxxx.com:22

    Connection successful

    Server System: 220-Xxxxx Secure FTP

    220 **Authorized Access Only**

    Request Path: /PAX_Test_Xpance

    Response Path: /PAX_Test_Xpance

    List Directory: /PAX_Test_Xpance/

    List Directory /PAX_Test_Xpance/ Error

    Disconnected from ftp_useast.xxxxxxxx.com:22

    8/20/2024 4:14:07 PM FTPSCheckConnected, CK Login Reply: 220-Xxxxxx Secure FTP
    220 **Authorized Access Only**
    8/20/2024 4:14:07 PM FTPSCheckConnected, CK Request Path after Login: /
    8/20/2024 4:14:07 PM FTPSCheckConnected, CK Change Path to /PAX_Test_Xpance
    8/20/2024 4:14:07 PM FTPSCheckConnected, CK Request Path after Change: /PAX_Test_Xpance/
    8/20/2024 4:14:17 PM FTPListDirectory, CK GetDirCount Error: ChilkatLog:
    GetDirCount:
    DllDate: Jan 27 2024
    ChilkatVersion: 9.5.0.97
    UnlockPrefix: CPSFBE
    UnlockStatus: 2
    Architecture: Little Endian; 64-bit
    Language: Delphi DLL
    VerboseLogging: 0
    listPattern: *
    fetchDirListing:
    pattern: *
    supportsMLSD: 1
    fetchDirListing2:
    setupDataConnection:
    active transfer mode
    setupActiveDataSocket:
    Created data listen socket
    Using ephemeral port range for Active data connection.
    dataPort: 51222
    portIpAddress: 192.168.xxx.xxx
    MyIPv4: 192,168,xxx,xxx,200,22
    sendCommand:
    sendingCommand: PORT 192,168,xxx,xxx,200,22
    –sendCommand
    readCommandResponse:
    replyLineQP: 200 Port command successful
    –readCommandResponse
    –setupActiveDataSocket
    –setupDataConnection
    sendCommand:
    sendingCommand: MLSD
    –sendCommand
    completeDataConnection:
    acceptDataConnection:
    controlChannelReply:
    Reading intermediate response..
    readCommandResponse:
    replyLineQP: 150 Opening data channel for directory listing of “/PAX_Test_Xpance”

                  –readCommandResponse
    –controlChannelReply
    controlChannelReply:
    Reading final response..
    readCommandResponse:
    replyLineQP: 425 Can’t open data connection for transfer of “/PAX_Test_Xpance”

                  –readCommandResponse
    Final response indicates error.
    –controlChannelReply
    –acceptDataConnection
    Failed to accept data connection.
    –completeDataConnection
    Failed to complete the data connection.
    –fetchDirListing2
    –fetchDirListing
    Failed to get and cache directory listing…
    N: -1
    Failed.
    –GetDirCount

    If you need any help with this ‘data connection for ftp transfer’ question, please let us know.

    Best Regards,

    Limagito Team

    #ftp #managedfiletransfer #filetransfer #filemanagement

     

    By Limagito-Team FTP ,
  • 03 Sep

    How to exclude files if the date falls on a Sunday or Monday

    How to exclude files if the date falls on a Sunday or Monday

    Q: I have a task where I’m using change notify to check when a new folder is added. I’m filtering the folder by using %TCD:mmdd:, but the problem is I want to exclude the folders if the date falls on a Sunday or Monday. Is there a filter that would allow me to do that?

    A: This is possible using our Pascal Script option.

    • Open our Pascal Script setup:

    limagito file mover pascal script option

    • Please enable and add the following ‘On RuleBegin’ Pascal Script:
    Begin
      psExitCode:= 1;
      // ... add your code here
      IF DayOfTheWeek(Now) in [1,7] Then
        psExitCode := 0;
     
      (*
      The DayOfTheWeek function returns an index number for the day of the week :
      1         = Monday
      2         = Tuesday
      3         = Wednesday
      4         = Thursday
      5         = Friday
      6         = Saturday
      7         = Sunday
      *)    
    End.

    limagito file mover exclude files if the date

    If you need any help with this ‘exclude files if the date’ request, please let us know.

    Best Regards,

    Limagito Team

    #managedfiletransfer #filetransfer #filemanagement

  • 01 Sep

    Count the number of occurrences of an xml field

    Q: We would like to count the number of occurrences of point X in a xml file and update the file name with that value. Kindly refer the code and validate with sample file attached . Let us know if any details required from us.

    • Input file Name: 12345678.3959-2024.04.25-08.20.30-WIT-signed.xml
    • Generated Output file Name : 12345678.3959-2024.04.25-08.20.30-WIT-signed.79.xml

    Content example xml file:

    limagito file mover C:\Users\coene\Downloads\Count the number of occurrences\count the number of occurrences

    A: Please have a look at the following screenshots:

    • We added the floowing WIN as Source:

    limagito file mover windows folder as source

    • Please open our Pascal Script option:

    limagito file mover pascal script option

    • Enable and Add the following On Destination Pascal Script:

    Link to Script, we are using the psVIA (Pascal Script Variable Integer A, = %VIA parameter):

    limagito file mover count the number of occurrences

    • Destination Setup, we added an Windows Folder as Destination:

    limagito file mover destination setup

    • Destination File Rename Setup:

    limagito file mover file rename setup

    As replacement parameter we’ll use the value of %VIA (= psVIA which we obtained previously in our Pascal Script):

    RegEx: (.*)\.(.*)
    Replacement:  \1.%VIA.\2
    limagito file mover file renaming setup
    – RunTime Log Result:
    limagito file mover runtime log result

    If you need any help with this ‘count the number of occurrences of a xml field’ request, please let us know.

    Best Regards,

    Limagito Team

    #xml #managedfiletransfer #filetransfer #filemanagement

1 2 3 4
SEARCH