• 28 Jul

    IMAP4 Custom Search Query option in Limagito File Mover

    In version v2021.7.28.0 we added a IMAP4 Custom Search Query option for the Second API Vendor (Vendor 2 – CK). This will give you quite some power to customize your search queries.

    Limagito File Mover IMAP4 Custom Search Query

    Select ‘Custom Search Query’ and add a ‘Search Filter’ for Email Matching Criteria.

    Return all messages.
    Search Filter: ALL

    Search for already-answered emails.
    Search Filter: ANSWERED

    Search for messages on a specific date. The date string is DD-Month-YYYY where Month is Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec.
    Search Filter: SENTON 05-Mar-2007

    Search for messages between two dates. SENTBEFORE finds emails sent before a date, and SENTSINCE finds email sent on or after a date.
    The “AND” operation is implied by joining criteria, separated by spaces.
    Search Filter: SENTSINCE 01-Mar-2021 SENTBEFORE 05-Mar-2021

    Another example of AND: find all unanswered emails sent after 04-Mar-2007 with “Problem” in the subject.
    Search Filter: UNANSWERED SENTSINCE 04-Mar-2021 Subject “Problem”

    Find messages with a specific string in the body.
    Search Filter: BODY “problem solved”

    Using OR. The syntax is OR <criteria1> <criteria2>. The “OR” comes first, followed by each criteria.
    For example, to match all emails with “Help” or “Question” in the subject.
    You’ll notice that literal strings may be quoted or unquoted. If a literal contains SPACE characters, quote it.
    Search Filter: OR SUBJECT Help SUBJECT Question

    ****************************************************
    *** FYI Strings are case-insensitive when searching ***
    ****************************************************
    Find all emails sent from limagito.com addresses.
    Search Filter: FROM limagito.com

    Find all emails sent from anyone with “John” in their name.
    Search Filter: FROM John

    Find emails with the RECENT flag set.
    Search Filter: RECENT

    Find emails that don’t have the recent flag set.
    Search Filter: NOT RECENT

    This is synonymous with “OLD”.
    Search Filter: OLD

    Find all emails marked for deletion.
    Search Filter: DELETED

    Find all emails having a specified header field with a value containing a substring.
    Search Filter: HEADER DomainKey-Signature paypal.com

    Find any emails having a specific header field. If the 2nd argument to the “HEADER” criteria is an empty string,
    any email having the header field is returned regardless of the header field’s content.
    Find any emails with a DomainKey-Signature field.
    Search Filter: HEADER DomainKey-Signature “”

    Find NEW emails: these are emails that have the RECENT flag set, but not the SEEN flag.
    Search Filter: NEW

    Find emails larger than a certain number of bytes.
    Search Filter: LARGER 500000

    Find emails marked as seen or not already seen.
    Search Filter: SEEN
    Search Filter: NOT SEEN

    Find emails having a given substring in the TO header field.
    Search Filter: TO support@limagito.com

    A more long-winded way to do the same thing.
    Search Filter: HEADER TO support@limagito.com

    Find emails smaller than a size in bytes.
    Search Filter: SMALLER 30000

    Find emails that have a substring anywhere in the header or body.
    Search Filter: TEXT “Log File”

     

    If you need any help with this second ‘IMAP4 Custom Search Query’, please let us know.
    Best Regards,

    #FileTransfer

    Limagito Team

    By Limagito-Team IMAP4 , ,
  • 28 Jul

    Second IMAP4 Vendor option was added in Limagito File Mover

    A second IMAP4 vendor was added in LimagitoX File Mover version v2021.7.28.0. This second vendor is also based in the USA and has a long history with providing API’s for many internet protocols. The reason we did this is because we want to be ready for the future. This second vendor opens new opportunities and also supports TLS1.3 (Security Tab – Select ‘Automatically TLS’).

    Limagito File Mover IMAP4 Setup

    For this Second Vendor we added a ‘Custom Search Query’ option.

    Limagito File Mover IMAP4 Custom Search Query

    If you need any help with this ‘Second IMAP4 Vendor’, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team IMAP4 ,
  • 15 Jul

    Can you use the date in a file name to create the subdirectory?

    Q: Can you use the date in a file name to create the subdirectory? So, when moving the attached file, we would like to create a sub-directory of:

    C:\Users\niall\WindowsDatabase\Destination\Valuation\2021\06. Jun\ ,

    Where ‘2021\06. Jun\’ is derived from the name of the source file? Thinking if we can pull a date variable/parameter from the filename we could pass it into the directory set-up. I can’t see how to get there.

    A: Yes this is possible using some Pascal Script.

    We received the following filename from the customer: ‘Valuation_2021-06-21.csv’. We’ll use this in the following example but remember we can adjust the script for any other filename you might have.

    1.Using a Windows folder as Source:

    Limagito File Mover Windows Folder as Source

    2.Open our ‘Pascal Script’ option:

    Limagito File Mover Pascal Script Menu

    3. Add  and enable the following ‘On Destination’ Pascal Script:

     

    Var
      tmpDate: TDateTime;
      tmpDatePart: String;
      tmpList: TStringList;
     
    Function GetDateFromString(const aInput: String): TDateTime;
    var
      wYear, wMonth, wDay: Word;
    Begin
      wYear := StrToInt(Copy(aInput, 1, 4));
      wMonth := StrToInt(Copy(aInput, 6, 2));
      wDay := StrToInt(Copy(aInput, 9, 2));
      Try
        Result := EncodeDate(wYear, wMonth, wDay);
      Except
        Result := 0;
      End;
    End;
     
    Begin
      // Valuation_2021-06-21.csv
      psExitCode:= 0;
      // ... add your code here
      tmpList := TStringList.create;
      Try
        tmpList.delimiter := '_';
        tmpList.DelimitedText := psFileName;
        If tmpList.Count >= 2 Then
        Begin
          tmpDatePart := tmpList.Strings[1];
          psLogWrite(1, '', 'DatePart from File ' + psFilePath + psFileName + ': ' + tmpDatePart);
          tmpDate := GetDateFromString(tmpDatePart);
          // 2021\06. Jun\
          If Not (tmpDate = 0) Then
          Begin
            psVSA := FormatDateTime('YYYY', tmpDate);
            psVSA := psVSA + '\' + FormatDateTime('DD', tmpDate);
            psVSA := psVSA + '. ' + FormatDateTime('MMM', tmpDate) + '\';
            // Debug        
            psLogWrite(1, '', 'Result psVSA: ' + psVSA);
            psExitCode := 1;
          End
          Else
            psLogWrite(1, '', 'GetDateFromString Error, ' + tmpDatePart);
        End
        Else
          psLogWrite(1, '', 'Count FileName _ Parts Error, ' + psFileName);
      Finally
        tmpList.free;
      End;
    End.

    Limagito File Mover Pascal Script

    4. Adjust the ‘Create Subdir option’ to %VSA in your Destination Setup. We used a Windows folder as Destination in our example.

    Limagito File Mover Destination Setup

    5. RunTime Log Result:

    Limagito File Mover RunTime Log

    #FileTransfer

    If you need any info about this ‘date in a file name to create the subdirectory’ feature, please let us know.

    Best regards,

    Limagito Team

1 2 3 4
SEARCH