• 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 ,
  • 08 Oct

    Howto unzip JPG from ZIP files using Limagito File Mover

    Q: I would like to unzip JPG from a ZIP files. Every ZIP files contain JPG, XML. I would try to extract only JPG files from ZIP, but I can’t do it. All files are extracted, that obliges me to add deletion rule to delete XML files in the target folder.  Is it possible to build a rule, and ask for extract only .JPG files from ZIP ?

    A: In version v2021.10.8.0 we added a new Extract Mask option in the UNZIP Destination Setup to achieve this. We immediately added an include and exclude Extract Mask.

    • Extract Include Mask ( default *.* )
    • Extract Exclude Mask ( default ‘blanco’ )

    In this example we set the ‘Extract Include Mask’ to  *.jpg  so only jpg files form the zip (or other compressed file) will be extracted.

    Limagito File Mover Extract Mask


    If you need any info about this ‘unzip JPG from a ZIP’ request, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team ZIP , ,
  • 09 Jul

    List of filename parts to move in a text file with Limagito File Mover

    Q: Is it possible to have a list of filename parts in a text file and use this to move any files whose name matches the whole filename or part file name in a directory? I’ve had a look on the blog but I think that is only for 1 file using a part filename.

    A: In version v2021.7.9.0 we added a new option to achieve this. We added some screenshots to get you started.

    1. Windows Folder as Source. This folder will contain all files. We’ll filter them using information from a seperate text file.

    Limagito File Mover Source Setup

    Our Source folder contains 244 files:

    Limagito File Mover Source Files

    2.Next, please open the Rule Parameters option of this Rule.

    Limagito File Mover Rule Parameters

    Select the text file containing the filename parts we’ll use to filter the files we want to copy. We selected ‘On Rule Begin’ as Load File Mode, so the content of this text will will be reloaded on each Rule Begin. We also enabled ‘Reload only when file content changes’ to prevent unnecessary loading of this file.

    Limagito File Mover File Content Setup

    Content of the text file we’ll use to filter the files we want to copy, it contains parts of filenames.

    Limagito File Mover File Parts as Content Filter

    3. Open the File Filter setup and select ‘File Contents > Include’ Tab. Enable the new option called ‘Add wildcards to File Content Entries in search’.

    When enabled wildcards will be added to each entry of the file content (in memory) during the search.
    Suppose file name found in source folder would be: test.pdf
    And the include FileContent would contain: test
    With this option enabled the file would be picked up because we will check test.pdf with *test*

    Limagito File Mover File Filter Setup

    4. As Destination we also added a Windows Folder:

    Limagito File Mover Destination Setup

    5. RunTime Log Result. Of  the original 244 files in the Source folder, 216 were copied due to the File Content Filter.

    Limagito File Mover RunTime Log Result


    If you need any info about this new ‘List of Filename parts’ option, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team Filters , ,
1 2