• 12 Nov

    How to merge and add filenames to csv datafiles

    How to merge and add filenames to csv datafiles

    Q: I have a new daily job where I will receive 3 CSV files. I need to merge these together and also add a new field to the data that contains the original filename as I need to split them later on in the process and use the original filename to send back to the client. Also, I may not always get all 3 files so the rule needs to work for receiving 1,2, or all 3 files.

    We will run the rule at 18:00 for example and process however many files have been uploaded, then run the rule every 1 hour after to pick up any files that the client has uploaded late. The ideal scenario would be for all 3 files to be uploaded by the client by the scan time, but they want us to be able to pick up any files they may upload late.

    The data does not contain headers either. I’m sure I have asked this before but I can’t find the solution if I have, I have found similar and have tried to amend it to suit but failed miserably.

    A: We asked and received the following example files:

    • BTW_Invites_20231023_1.csv
    • BTW_Reminders_20231023_1.csv
    • BTW_Results_20231023_1.csv

    We used a Windows folder as Source:

    limagito file mover windows folder as source

    We added the following ‘Include Filename’ Filter because we want to be sure to only process .csv files:

    limagito file mover filename filter setup

    As Destination we add our ‘Pascal Script’ option:

    limagito file mover destination setup

    Destination Pascal Script, do not forget to adjust the ctOutputPath const (Path must end with a \ ).

    The script will add the filename of the source csv file to the end of each entry of the merged csv file. The Destination merged csv file is determined by stripping parts of the source filename. In our example it will be: ‘BTW_Merged_20231023_1.csv’.

    This script is just an example and it can be adjusted so it fits your needs, just let us know.

    You can download the script: here

    limagito file mover merge and add filenames script

    RunTime Log Result:

    limagito file mover runtime log result

    #csv #filetransfer #filemanagement

    If you need any help with this ‘merge and add filenames’ option, please let us know.

    Best Regards,

    Limagito Team

  • 12 Nov

    How to skip a path in http as source method 2

    How to skip a path in http as source method 2

    Q: There are times when downloads are no longer needed for a couple months, is there something I can place in front of the URL to that they are skipped? I tried a semicolon and that did not work 🙂

    A: Option added in version v2023.11.10.0

    When the URL starts with a ! (exclamation mark) then it will be skipped, example: !https://limagito.com/helpxfm/IntroXFM.pdf
    limagito file mover skip a path in http

    #filetransfer #filemanagement

    If you need any help with this ‘skip a path in http’ option, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team HTTP
  • 12 Nov

    Change Notify network folders usage optimization

    Change Notify Network folders usage optimization (v2023.11.11.0) [*]

    In this version we optimized the code for network folders. We added a watchdog in case something goes wrong with the connection to the network folder. It will show you the necessary error information in the log and also we linked the ‘On No File Found’ event to the case when the watchdog is triggered. You could use this event to get an email notification when something goes wrong with the Change Notify monitoring of a (network) folder.

    limagito file mover rule events

    limagito file mover on no file found event

     

    Change Notify, Force scan after error recovery (v2023.11.12.0) [+]

    New option ‘Force single scan after error recovery’ was added. If due to some reason the connection to the network share is lost and repaired afterwards by the new Watchdog option, you have the possibility to do a full scan of the source folder.

    limagito file mover chnage notify network folders

     

    #filetransfer #filemanagement

    If you need any help with this ‘Change Notify network folders’ option, please let us know.

    Best Regards,

    Limagito Team

1 2 3 4 5 6 7 26
SEARCH