File Mover Blog

  • 12 Feb

    SMTP User authentication failed error

    SMTP User authentication failed error

    Q: I tried enabling the event rule with common smtp and received this error. Our SMTP uses port 25 and we verified the server can send an email using the same credentials using powershell. Do you know what could be an issue?

    SMTP user authentication failed

    A: Could you please in your SMTP setup disable ‘Allow Authentication’

    Limagito File Mover SMTP Allow Authentication

    #FileTransfer #SMTP

    If you need any info about this ‘User authentication failed’ error, please let us know.

    Best regards,

    Limagito Team

  • 11 Feb

    Lower case file rename using regular expression

    Q: We are having some trouble coming up with a proper reg-ex that will rename our files properly, and would like some advice.

    We are receiving files that are named as follows.

    ABCDE_ABC

    We would like to rename them to

    ABCDE_abc

    We have found several reg-ex commands that will do this, but none of them seem to work in the Limagito application. I am sure we have something wrong, but I am unable to find something that will give us the output that we want.

    Do you have any suggestions? Or perhaps an example string?

    Q: Yes this is possible using our File Rename option in your Destination setup:

    • Destination “File Rename” Setup

    Limagito File Mover Destination File Rename Setup

    > We are receiving files that are named as follows: ABCDE_ABC

    > We would like to rename them to ABCDE_abc

    We guess these file have a file extension so you could use:

    Lower Case File Rename RegEx

     

    #FileTransfer #RegEx

    If you need any info about this ‘lower case file rename ’ request, please let us know.

    Best regards,

    Limagito Team

  • 10 Feb

    Move and change content of a txt-file

    Q: Hello Limagito, Now I need your help again…

    I got a TXT-file delivered from my customer with approximately 250 rows.

    In the txt file I like “search and replace” a text string :

    ;19;18;;

    Should be replaced with

    ;36;35;;

    And the string

    ;21;21;;

    Should be replaced with

    ;37;37;;

    I also tried to set the powershell exe file in the field for Application name (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe)

    Is there any other way?

    A: Yes there is, we can do this easily with our Pascal Script so no need for external scripts if you want.

    In our example we’ll use a Windows folder as Source:

    Limagito File Mover WIN as Source

    We only want to handle .txt file so we added the following Filename Include Filter:

    Limagito File Mover Include Filename Filter

    As Destination we added a Pascal Script. This script will does the work you requested.

    Limagito File Mover Pascal Script as Destination

    • Adjust ctOutputPath > must end with a \
    • Encoding of destination text file can be adjusted

     

    Var
      tmpFileIn, tmpFileOut: String;
      tmpList: TStringList;
    Const
      ctOutputPath = 'C:\Test\Out_Txt\';
    Begin
      // Init var
      psExitCode:= 0;
      tmpFileIn := psFilePath + psFileName;
      tmpFileOut := ctOutputPath + psFileName; 
      // ... add your code here
      tmpList := TStringList.Create;
      Try
        Try
          tmpList.LoadFromFile(tmpFileIn);
          tmpList.Text := psStringReplace(tmpList.Text, ';19;18;;', ';36;35;;');
          tmpList.Text := psStringReplace(tmpList.Text, ';21;21;;', ';37;37;;');
          // https://docs.microsoft.com/nl-be/windows/win32/intl/code-page-identifiers
          If psSaveTxt2File(tmpList.Text, ctOutputPath + psFileName, 'ISO-8859-1', False) Then
          Begin
            psExitCode := 1;
            psLogWrite(1, '', 'SaveToFile ' + tmpFileOut + ' Successful');    
          End
          Else
            psLogWrite(1, '', 'SaveToFile ' + tmpFileOut + ' Error');
        Except
          psLogWrite(1, '', 'LoadFromFile ' + tmpFileIn + ' Exception');
        End;
      Finally
        tmpList.Free;
      End;  
    End.
    

    Limagito File Mover Pascal Script as Destination

    Feedback Customer:

    As always you save the day! The Pascal script did my work easily. Some day I have to learn more about pascal!

    I cheat some in powershell and some visual basic, but this stuff is powerful!

    By the way, it only worked in the newer version of Limagito (I still have some workflows in the old version)

    Thank you for help, quick and accurate, as always!

    #FileTransfer #Encoding

    If you need any info about this ‘change content of a txt-file’ request, please let us know.

    Best regards,

    Limagito Team

1 39 40 41 42 43 44 45 145
SEARCH