File Mover Blog

  • 14 Jan

    Kicking sessions because of too many failed commands

    Kicking sessions because of too many failed commands

    Q: Dear support team, With one of our vendors our IP has been banned for invalid commands .

    2024-01-04 01:20:56,152 WARN [com.dymmyhost.mft.port ][6353] – |—Kicking sessions because of too many failed commands.—

    Looking at our log, I could see the error

    1/8/2024 9:31:48 AM SFTPRemoveFile, SB Delete Exception: %DELE-not found%

    What is that? Please consider that we use the option: “use .tmp extention”

    Regarding the .TMP extension, we used it to avoid that the 3rd party could get it before the file transmission. I don’t know if this is related to the error.

    limagito file mover sftp as destination setup

    A: This option is helpful when uploading large files and to prevent another process from picking up the files from the SFTP server before the file upload is complete as you said. We upload the file with a .tmp extension, for example “MyUpload.pdf” will be uploaded as “MyUpload.pdf.tmp”. When the upload is successful we first try to delete any existing “MyUpload.pdf” file on the SFTP server and next we’ll rename “MyUpload.pdf.tmp” to “MyUpload.pdf”. The fact that we are trying to delete an non existing file is giving you the issue with this SFTP server it seems.

    Reply Customer: For these jobs we use unique and progressive file names, so there is no possibility to have 2 files with the same name. For us is much better to manage this kind of exception instead of sending a command that periodically makes our IP banned.

    A: In version v2023.1.14.0 we added the following option ‘Use Temp Extension Method’.

    Open your SFTP as Destination setup and witch to the ‘Common’ tab. In your case (unique filenames), you could switch to ‘Rename Only’.

    • Default (Try delete before rename)
    • Check file exist before delete & rename
    • Rename Only

    limagito file mover sftp too many failed commands

    sftp #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘too many failed commands’ question, please let us know.

    Best Regards,

    Limagito Team

  • 11 Jan

    How to monitor if a file doesn’t make it to a directory

    Q: I’m looking for a way to monitor if a file doesn’t make I to a directory.  The filename of the files have the date in it.  “Importer_WXII_mm-dd-yyyy-#0.xml”.  example for today would be “Importer_WXII_01-09-2024-#.xml”  The date in the filename will not match the modified or created time stamp of the file.  I’m looking for a way to monitor the directory send a failure email if the file name is not present within a certain time span of the date.  Example would be

    If “Importer_WXII_01-11-2024-#0.xml” file exists and the current computer date is 01-10-2024 then nothing happens the file needed exists so no issues.  On the other hand.

    If “Importer_WXII_01-11-2024-#0.xml” file does not exist and the current computer date is 01-10-2024 and its 12hours before 01-11-2024 then email is sent.

    limagito file mover monitor if a file does not make it to a directory

    A: We did a test and added the following screenshots to get you started.

    • We used a Windows folder as Source:

    limagito file mover windows folder as source

     

    • We added the following Filename Include Filter. This filter will check if the xml you need is available.
    Importer_WXII_%TCD:[IncDay+1]MM-DD-YYYY:-#0.xml

    limagito file mover filename filter

    • Important, do not forget to enable ‘Allow parameters in File Name Filter’:

    limagito file mover file filter

    • Set Function to Copy, don’t worry we are not going to do anything with the xml files.

    limagito file mover function setup

    • We added a dummy ‘Pascal Script’ as Destination:
    Begin
    psExitCode:= 1;
    // ... add your code here
    psLogWrite(1, '', 'We found file: ' + psFilePath + psFileName);
    End.
    

    limagito fil emover pascal script as destination

    • Next, Rule Events setup:

    limagito file mover rule events option

    • Select and enable the ‘On No File Found’ event. We are going to send an email when the xml file is not available.
      • Enable and setup ‘Mail Event’:

    limagito file mover rule events setup

      • Enable and setup ‘Pascal Script’. This will add some info into the log window.
    Begin
    psExitCode:= 1;
    // ... add your code here
    psLogWrite(1, '', 'xml file not available');
    End.
    

    limagito file mover rule events setup

    • Schedule setup:
      • Disable Timer:

    limagito file mover timer setup

      • Add a Schedule when you would like to check for this xml file.

    limagito file mover scheduler setup

    • You can add multiple Schedules if you want.

    limagito file mover scheduler setup

    #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘monitor if a file doesn’t make it to a directory’ question, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team Events Filters
  • 09 Jan

    How to search for a string and replace it with a CRLF

    How to search for a string and replace it with a CRLF

    Q: Is it possible to search for a string and replace it with a CRLF (as we say in windows) [Return]

    The main issue is to replace <br/> with a carriage return Line feed

    A: Yes this is possible by adding the following script:

    • We used a Windows folder as Source:

    limagito file mover Windows folder as source

    • Because we only want to process text files, we added the following include filename filter:

    limagito file mover file filter setup

    • As Destination we added our Pascal Script option, do not forget to adjust the ctOutputPath const:
      • Please add the following script: link
      • This script will replace all <br/> entries by #13#10 (CRLF)

    limagito file mover destination setup

     

    #fileconversion #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this question, please let us know.

    Best Regards,

    Limagito Team

     

1 4 5 6 7 8 9 10 135
SEARCH