File Mover Blog

  • 19 Mar

    SQL Source – RecordCount as variable?

    Q: With the SQL Source is there a way to access the RecordCount as variable? Would be nice to include it in the subject line of an email Destination. Many thanks!

    A: We added two new parameters in version v2022.3.18.0.

    1. %QDC = Query Destination record Count, when using SQL as Destination
    2. %QSC = Query Source record Count, when using SQL as Source

    You can use %QDC and %QSC within your email or at other positions where parameters can be used. Some screenshots to get you started.

    1. In our example we’ll be using SQL as Source. You can find more information about the setup of ‘SQL as Source’ in our Blog.
    Limagito File Mover SQL as Source
    2. We’ll be using the new %QSC parameter in an email event:
    Limagito File Mover Rule Events
    3. We enabled the ‘On Success’ event and the ‘Enable Mail’ option:

    Limagito File Mover Rule Event Setup

    4. In the email setup we used our new %QSC parameter so the RecordCount will be displayed.

    Limagito File Mover Email Message RecordCount

    4. Received Email:

    Limagito File Mover SQL RecordCount Email

    #SQL #Filetransfer

    If you need any info about this ‘RecordCount as variable’ option, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team SQL ,
  • 19 Mar

    CoreFTP Client can not connect to Limagito File Mover SFTP Server

    Q: CoreFTP Client can not connect to Limagito File Mover SFTP Server
    A: This issue was fixed in version v2022.3.19.0

    In this version we have updated our SFTP server code and fixed the mentioned problems with the CoreFTP client.
    Also, we have improved the connection time by upgrading the Big Integer algorithms, which are used to encrypt the communication.

    #SFTP #Filetransfer

    If you need any info about this ‘CoreFTP Client can not connect’ problem, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team SFTP
  • 19 Mar

    Move a file and send email with filename and line count

    Q: Move a file and send email with filename and line count.

    Can you help me with the following question.

    I want to move a file and in an email state the file name (always a text file .csv, .txt) and a line count
    Test.txt – 12 lines

    Can this be done?

    A: Yes this is possible. We have created a Pascal Script for you to achieve this.

    1. It is important that you’ll only handle txt and csv files (text based files). We added a File Name Include File Filter, just to be sure:

    Limagito File Mover Filename Filter

    2. Open our ‘Pascal Script’ option:

    Limagito File Mover Pascal Script option

    Add and enable the following ‘On Destination’ Pascal Script. This script will load the txt/csv file and will put the line count information into our %VSA parameter which can be use within our notification email.

    Var
      tmpCount: Integer;
      tmpList: TStringList;
    Begin
      psExitCode:= 0;
      // ... add your code here
      tmpList := TStringList.Create;
      Try
        Try
          // Load Source File
          tmpList.LoadFromFile(psFilePath + psFileName);
          // Count Lines
          tmpCount := tmpList.Count;
          // Info to be used in email
          psVSA := psFileName + ' - ' + IntToStr(tmpCount) + ' lines';
          psLogWrite(1, '', 'Information: ' + psVSA);    
          // Set Result OK
          psExitCode := 1;
        Except
          psLogWrite(1, '', 'Error loading: ' + psFilePath + psFileName);
        End;
      Finally
        tmpList.Free;
      End;  
    End.
    

    Limagito File Mover Pascal Script option

    3. Now you can use the %VSA as parameter within the email setup:

    Limagito File Mover Email Notification Setup

    Limagito File Mover Email setup

    4. Email Result:

    Limagito File Mover Email result

     

    #Filetransfer

    If you need any info about this option, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team Email Pascal Script
1 63 64 65 66 67 68 69 151
SEARCH