File Mover Blog

  • 07 Jan

    Replacement Parameter File Created Date for Source File

    Replacement Parameter File Created Date for Source File

    Q: I see options in the Replacement Parameters for the Source, File Modified Date but I would also like the option for the Source, File Created Date. Is that something that can be added?

    limagito file mover parameters

    A: We added this option in version v2024.1.7.0

    • Parameters, Added %SFA Source File last Acces time
    • Parameters, Added %SFB Source File Birth (= creation) time

    As a test we added the new parameters in our WIN as Destination setup. These new parameters will be used to create a subdirectory:

    Reminder: What are the Date & Time parameters that we can use?

    limagito file mover Replacement Parameter File Created Date

    • RunTime Log Result:

    limagito file mover runtime log result

    • Output Result:

    limagito file mover Replacement Parameter File Created Date output

    • We also added some extra Pascal Script DateTime var linked to Source File Last Access, Creation and Modified Times:
      • psFileADateTime variable = Last Access Time
      • psFileCDateTime variable = Creation Time
      • psFileMDateTime variable = Modfied Time

    An example of using these new Var in our Pascal Script as Destination option:

    limagito file mover pascal script as destination

    #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘Replacement Parameter File Created Date’ question, please let us know.

    Best Regards,

    Limagito Team

  • 05 Jan

    How to remove the header row from a CSV file

    How to remove the header row from a CSV file

    Q: We have a CSV file that contains a header row.  Is it possible for Limagito to remove the first row in the file when we move it to a new folder?  Both the start and ending locations are on a windows server.

    A: Yes, this is possible. Please have a look at the following screenshots.

    • The customer is using a Windows folder as Source so we used this also in our example:

    limagito file mover Windows folder as source

    • We added an include filename filter so we are 100% we’ll only pickup .csv files:

    limagito managedfiletransfer filename filter

    • In our Destination setup we added our ‘Pascal Script’ option:

    limagito managedfiletransfer destination setup

    • Please add the following script (v1): link
    • We also added an alternative for the first script. In this script you can enable or disable the “TrailingLineBreak = finishing line break” (v2): link
      • psSaveListToFile(tmpList, tmpOutputFile, False);
      • psSaveListToFile(tmpList, tmpOutputFile, True);
    • We even added a third possibility where you can change the encoding and BOM of the resulting Csv file (v3): link
    • If you would need a different option, please let us know, many options are possible.

    remove the header row

    • RunTime Log Result:

    remove the header row

    #csv #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘remove the header row’ question, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team CSV Pascal Script , , ,
  • 30 Dec

    Split delimited files based on duplicate column

    Split delimited files based on duplicate column

    Q: We receive | (pipe) delimited files (no double quotes):

    Rvman International Inc. – US|CONTENT + US|1310001|0000000122|10/25/2023 1:54 PM
    Rvman International Inc. – US|CONTENT + US|1310002|0000000616|0/25/2023 2:10 PM
    Rvman International Inc. – US|CONTENT + US|1310002|0000000616|0/25/2023 2:10 PM

    Is it possible to create separate files of rows with the same content in column 4?

    The filename(s) would be incremental:

    original .csv

    Rvman International Inc. – US|CONTENT + US|1310001|0000000122|10/25/2023 1:54 PM

    original1.csv

    Rvman International Inc. – US|CONTENT + US|1310002|0000000616|0/25/2023 2:10 PM
    Rvman International Inc. – US|CONTENT + US|1310002|0000000616|0/25/2023 2:10 PM

    Thanks for such a great product!

    A: Yes this is possible using our Pascal Script option

    We used a Windows folder as Source. In this folder we’ll search for .csv files.

    limagito file mover as source

    Since we are only interested in .csv files we added a filename include filter. We want to be sure we’ll only handle .csv files.

    limagito filemover filename filter

    As Destination we used our Pascal Script option. Please replace the default Destination Pascal Script.

    You can download the script: here

    The script will read the csv file with  a pipe as delimiter (this can be adjusted > ctPipe constant). We’ll check the content of column 4 which is index 3 (TStringList = zero index based).

    tmpCol4 := tmpPipe.Strings[3];

    Limagito File Mover pascal script as destination

    Output Result:

    Split delimited files based on duplicate column

    RunTime Log Result:

    limagito file mover runtime log result

    #csv #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘Split delimited files based on duplicate column’ question, please let us know.

    Best Regards,

    Limagito Team

1 5 6 7 8 9 10 11 135
SEARCH