• 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

  • 29 Dec

    Copy and rename a file using its folder name

    Copy and rename a file using its folder name

    Q:  We need your advice please as following:
    A customer need a copy & rename batch to another destination – the mainfolder is e.g. V360_images and inside we have a lot of subfolders with image files in jpg or mp4 file format. The job file named still.jpg should be copied to the another folder destination and renamed with the numbers of the the folder – see here:

    limagito file mover rename a file using its folder name

    Here we are inside of the folder #658301 – the job file still.jpg should be copied to folder e.g.: images and renamed with the folders name to 658301

    limagito file mover rename a file using its folder name

    Is this task possible to automate with Limagito File Mover without any scripting?

    A: Yes this is possible. In our example we used a Windows folder as Source:

    limagito file mover windows folder as source

    Since the customer is only interested in the ‘still.jpg’ file we added the following include filename filter:

    limagito file mover include filename filter

    We only want to scan within the subfolders of the Source root folder ( in our example > C:\Test\Customer\In2\V360_Images\ ). We do not want to pickup any files in this Source Root folder and that is why we enabled the following options:

    limagito file mover directory filter setup

    We used a Windows folder as Destination: ‘C:\Test\Customer\Out2\Images\’

    limagito file mover destination setup

    Since all Source files should go to a single Destination folder, we disabled our ‘Create Subdir’ option (File & Directory Tab). We do not want to create any subfolders in the Destination.

    limagito file mover windows folder as destination

    Next switch to the ‘Rename’ tab and enable ‘Rename Files during Copy/Move’. Open the ‘Rename Filter Setup’.

    limagito file mover file rename options

    We’ll use the Source SubFolder parameter (%SFS) in the renaming setup. RegEx  (.*)\.(.*)  will split the filename into two parts, first part are all characters before the dot and part two are all characters after the dot. The first part \1 will no longer be used but replaced by the Source SubFolder name. The second part \2 (= file extension) will be used again.

    Added the following RegEx and Replacement setup:

    RegEx:  (.*)\.(.*)

    Replacement:  %SFS.\2

    limagito file mover file renaming setup

    RunTime log result:

    limagito file mover runtime log result

     

    #rename #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘rename a file using its folder name’ question, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team Rename ,
  • 29 Dec

    Rename file before processing it to the destination folder

    Rename file before processing it to the destination folder

    Q: Good day. Requesting your assistance on the below scenario. We need to rename the filename once the file is moved to the destination folder.

    Original filename from the source is SOHF_JC_231012.csv. We need it to rename to SOHF_JCAQ_231012.csv.

    May we know if this is possible in Limagito?

    A: Yes this is possible.

    Open the Destination setup > switch to Rename Tab > Enable “Rename Files during Copy/Move” option  and use the following setup:
    RegEx:   (.*)_(.*)_(.*)
    Replacement:    \1_\2AQ_\3

    limagito file mover rename file before processing

    #rename #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘Rename file before processing’ question, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team Rename
1 2 3 4 26
SEARCH