stabilize

  • 29 May

    Specify to copy the second most recent file

    Q: Can you recommend any way using Limagito, that we can specify to copy the second most recent file, i.e. at midnight today, copy the file from midnight yesterday? So the creation of a new file in the folder would trigger the copying of the previous file.
    A client of ours has recently licensed Limagito. The primary use is for transferring text files from an equipment server to a historian server, where it can be processed. We have one use case that is a bit tricky, and we are hoping that you can help with it. The source equipment produces an audit trail text file, which captures changes to the system on a continuous basis. The equipment creates the file every 24 hours, at midnight. Until now, we had been copying this file at midnight, to transfer for processing. The rule we use identifies when a new file is created, and copies this new file. We assumed that the file held the audit trail records for the previous 24 hour. But what is actually the case is that the equipment creates the file at midnight, and then continuously writes to the file for the next 24 hours, and creates a new (blank) file again the next midnight. So the files that we were copying were blank, or only held a few lines of data.
    So a little bit more info. Our client has previously been using different file mover software. They have only recently licensed Limagito. So currently, we are using that different software, but because they now have a Limagito license, we want to use Limagito instead,
    So currently, we have a rule set up (in the other software) which will detect when a new file is added/created in the source folder, and copy that file to the destination folder. So to answer your question, the equipment creates a new file in the source folder at midnight, which is initially blank, but it will write to that file at regular intervals for the subsequent 24 hours. But yes, as you say, we do a copy when the file appears for the first time. So the rule we use monitors the folder for new files, and copies a new file when it appears. What we want to do, is copy the file that was created 24 hours ago.

    A: In this case we could trigger the rule at for example 5 minutes past midnight and use a ‘File Date Include Filter’ of older than 1 day.

    • Please disable the Scan Timers in the ‘Schedule’ Setup:

    Limagito File Mover Disable Timers

    • Enable ‘Use Scheduler’ and Add the following ‘5 minutes past midnight’ schedule:

    Limagito File Mover Scheduler

    Limagito File Mover Once a day schedule

    • Because we are using a ‘Once a day’ trigger it is very important not to enable the ‘Stabilized File Check’ option. The reason is that this option needs at least two triggers because it needs to check if a file size is growing between triggers/scans or not.

    Limagito File Mover Stabilized file check

    • Add the following ‘File Date Include’ filter. Be sure to enable ‘Data Relative’ as File Date Filter Reference.

    Limagito File Mover copy the second most recent file

     

    #Filetransfer #Filemanagement

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

    Best regards,

    Limagito Team

SEARCH