File Mover Blog

  • 29 Mar

    Not able to upload to SFTP server, operation not supported

    Q: I run into an issue with a project that is migrating to a new partner SFTP server. We created an upload process in Filemover that takes a TXT file, encrypts it via PGP and then uploads it via SFTP to the partner. That is done within one rule. I copied this existing rule and changed it to point to the new server (also new user and new keys for authentication). SFTP connect is possible but when I try to let the rule run it throws an error message: operation not supported. Please inform me if you need any additional information.

    Limagito File Mover Operation Not Supported

    A: In version v2022.3.28.0 we added an extra option called ‘Upload ReadWrite Access Mode’. We did this in case for some strange reason the SFTP server does not like “writeOnly” (our default during file upload) and instead wants “readWrite”. Could you please enable this option and try once more. Log result would be appreciated.

    Limagito File Mover Operation not supported

    Feedback from customer:

    Awesome, that did the trick! Thank you very much for your quick and pragmatic support during the last days!

     

    #Filetransfer #SFTP

    If you need any info about this ‘Operation not supported’ error, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team SFTP
  • 25 Mar

    Email When Transfer Size is not Above 90GBs

    Q: Email When Transfer Size is not Above 90GBs. I have a job that runs everyday and 91GBs is transferred. On some days the job only transfers 60GBs because a file is locked. Is there a way to send an email when Limagito transfers anything under 90Gbs?
    A: Yes this is possible since version v2022.3.25.0. In this option we added some Integer (Int64) Var: psVIA (= Pascal Script Var Integer A).

    You’ll need to add some Pascal Script and Rule Event options to your existing transfer rule.

    1. Open our ‘Pascal Script’ option:

    Limagito File Mover Pascal Script option

    2. Enable and add the following ‘On Rule Begin’ Pascal Script (this script will set the integer psVIA Var to zero):

    Begin
      // ... add your code here
      psExitCode := 1;
      psVIA := 0;
    End.
    

    Limagito File Mover Email When Transfer Size Pascal Script

    3. Enable and add the following ‘On Rule End’ Pascal Script (this script will return an error internally when the total transfered size is not ok):

    Const
      ctMaxSize = 97710505984; // 90 GByte
    Begin
      psExitCode := 1;
      // Debug
      psLogWrite(1, '', 'End Size: ' + '%VIA');
      // Check
      If psVIA <= ctMaxSize Then
      Begin
        psLogWrite(1, '', 'End Size not above 90GBs');
        psExitCode := 0;
      End;
    End.
    

    Limagito File Mover Email When Transfer Size Pascal Script

    4. In the Function setup set 'Destination Options' to 'Destination Memory & Exit Cyclus on Error':

    Limagito File Mover Function Setup

    5. Add a Pascal Script as Destination. If you have multiple Destinations then our Pascal Script must be the last one in the list.

    Limagito File Mover Destinations

    6. Add the following Pascal Script as Destination (this will add the transfered filesize to the psVIA Integer Var):

    Begin
      // ... add your code here
      psExitCode:= 1;
      psVIA := psVIA + psFileSize;
      // Debug
      psLogWrite(1, '', 'Sum of Bytes: ' + Int64ToStr(psVIA));
    End.
    

    Limagito File Mover As Destination

    7. Open our 'Rule Events' option:

    Limagito File Mover Rule Events

    8. Select and enable 'On Pascal Script Error' event. With this event selected enable 'Enable Mail' and setup the Email and SMTP Setup.

    Limagito File Mover On Pascal Script Error Event

    Limagito File Mover Email Setup

    9. Received email in case 90GBs were not transfered:

    Limagito File Mover Email When Transfer Size email

    10. RunTime log will also show yout when transfered size was not reached:

    Limagito File Mover Email When Transfer Size RunTime Log

     

    #Filetransfer

    If you need any info about this ‘Email When Transfer Size’ request, please let us know.

    Best regards,

    Limagito Team

  • 24 Mar

    Move txt files if the line count is more than one

    Q: I am looking to move txt files to a location. If the line count is more than 1 (more than just a header) move to processing.
    A: Yes this is possible using some Pascal Script.

    1. Be sure that you will only handle text files. We’ve added a File Name Include Filter:

    Limagito File Mover Filename Filter

    2.Please open the ‘Pascal Script’ option:

    Limagito File Mover Pascal Script option

    3. Enable and Add the following ‘On Destination’ Pascal Script. You can choose between 0 or -1 as result for psExitCode var. 0 will give an error when such a file is found, -1 will skip such a file.

    Var
      tmpFile: String;
      tmpList: TStringList;
    Begin
      psExitCode:= 1;
      // ... add your code here
      tmpFile := psFilePath + psFileName;
      tmpList := TStringList.Create;
      Try
        Try
          tmpList.LoadFromFile(tmpFile);
          If tmpList.Count < 2 Then
          Begin
            // Invalid count
            psExitcode := -1; // := -1 is Skip File and := 0 is Error on File
            psLogWrite(1, '', 'Invalid recordcount in ' + tmpfile);      
          End;  
        Except
          // Error
          psExitCode := 0;
          psLogWrite(1, '', 'Error loading ' + tmpfile);
        End;
      Finally
        tmpList.Free;
      End;  
    End.
    
    

    Limagito File Mover Line Count is more

    4. RunTime Log

    Limagito File Mover RunTime Log

    #Filetransfer

    If you need any info about this ‘line count is more than’ request, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team Pascal Script
1 46 47 48 49 50 51 52 136
SEARCH