• 06 Jun

    Verify FTP download using existing hash file at source

    Q: I am downloading a file, plus the sha256.hash that was created at the file source via FTP. How can I verify FTP download with an already existing hash file? If the feature exists, I don’t seem to be able to find it. An example file name for my application is 12345.dmp – and the hash file is 12345.dmp.hash

    A: In our latest version v2022.6.6.0 we added an option to achieve your request.

    • Please open your FTP as Source Setup:

    Limagito File Mover FTP as Source

    • Select the Verify Tab:
      • Enable ‘Use Checksum file at source to verify download’ option
      • Select the ‘Algorithm’ you used to create the hash file on the FTP server
      • Select the ‘Encoding’ you used to create the hash file on the FTP server
      • Set Checksum Filename. Default is %SFN (= Source File Name) + .hash
        • We will look for that file at the FTP source to verify the download
      • Select if you want to keep the the checksum file download (move to Destination)

    Limagito File Mover Verify FTP download

    • File Filter Setup. In our example we are downloading and checking .pdf files so we added the *.pdf extension to the Filename Include Filter option. Please do not include the hash file extension, this is all handled by the ‘Use Checksum file at source to verify download’ option itself.

    Limagito File Mover File Filter Setup

    • RunTime Log Result:

    Limagito File Mover RunTime Log#FTP #Filetransfer #Filemanagement

    If you need any info about this ‘ Verify FTP download’ request, please let us know.

    Best regards,

    Limagito Team

  • 04 Jun

    Execute Command, continuing on error

    Q: Execute Command, continuing on error. I have a rule which moves a file from one win folder to another win folder and then runs a CMD against it. If the CMD errors out it keeps retrying the file. How do I move the failed file to another folder on the error and NOT retry it with the command line?
    My current setup is:

    • WIN as Source
    • Destinations:
      1. WIN
      2. CMD (Execute Command)

    A: In our latest version v2022.6.2.0 we added a new ‘Redirect ExitCode to PS Integer Var A (%VIA)’ option. Please check the ‘Advanced Tab’ of the CMD (Command) as Destination. Enable this option to transfer the ExitCode to our Pascal Script Integer Var psVIA. We’ll use the psVIA var to move the source file in case the Command returns a value <> 0 (which normally is an errorcode).

    Limagito File Mover continuing on error

    We will need a third ‘Pascal Script’ as Destination.

    1) WIN as Destination
    2) CMD as Destination
    Now please add a third ‘Pascal Script’ Destination. This must be in the last position. Do not forget to adjust the Const ctErrorPath value. This Pascal Script will move the source file to an error path if the ExitCode of the CMD (command) <> 0.

    Limagito File Mover Destination Setup

    Const
      ctErrorPath = 'C:\3ProcessError\'; // must end with a /
    Begin
      psExitCode:= 1;
      // ... add your code here
      If psVIA <> 0 Then
      Begin
        psMoveFile(psFilePath + psFileName, ctErrorPath + psFileName);
        psLogwrite(1, '', 'CMD ExitCode Error, psVIA: ' + IntToStr(psVIA));
      End;
    End.
    Limagito File Mover Pascal Script as Destination

    #Filetransfer #Filemanagement

    If you need any info about this ‘continuing on error’ request, please let us know.

    Best regards,

    Limagito Team

1 2
SEARCH