Filters

  • 27 Jan

    How to keep the most recent files regardless of the creation date?

    Q: Is it possible to create a rule of type: keep the 100 most recent files (regardless of the creation date)?

    A: In version v2024.1.27.0 we added this option for WIN as Source

    • Important, this new option is only available when using our [WIN] as Source (= Windows Folder or Network Share) option:

    limagito file mover windows folder as source

    • Next , select ‘Schedule’ button > ‘Advanced’ Tab:

    The new Skip option is available when the ‘Sort Order’ <> ‘OS Sort Order’

    • Skip none (default) = handle all sorted files found during scan of source folder(s)
    • Skip first x entries in file list = handle all except first x sorted files found during scan of source folder(s)
    • Skip last x entries in file list= handle all except last x sorted files found during scan of source folder(s)

    In the following setup we’ll scan the source folder(s) for files and afterwards we’ll sort them using the last write date (= modified date) from Old to New. When this is done we’ll skip the last 100 entries of this list. The result is that we’ll keep the 100 most recent files in the Source and will not handle (= copy/move/delete) them.

    limagito file mover keep the most recent files

    #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘keep the most recent files’ question, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team Filters WIN ,
  • 11 Jan

    How to monitor if a file doesn’t make it to a directory

    Q: I’m looking for a way to monitor if a file doesn’t make I to a directory.  The filename of the files have the date in it.  “Importer_WXII_mm-dd-yyyy-#0.xml”.  example for today would be “Importer_WXII_01-09-2024-#.xml”  The date in the filename will not match the modified or created time stamp of the file.  I’m looking for a way to monitor the directory send a failure email if the file name is not present within a certain time span of the date.  Example would be

    If “Importer_WXII_01-11-2024-#0.xml” file exists and the current computer date is 01-10-2024 then nothing happens the file needed exists so no issues.  On the other hand.

    If “Importer_WXII_01-11-2024-#0.xml” file does not exist and the current computer date is 01-10-2024 and its 12hours before 01-11-2024 then email is sent.

    limagito file mover monitor if a file does not make it to a directory

    A: We did a test and added the following screenshots to get you started.

    • We used a Windows folder as Source:

    limagito file mover windows folder as source

     

    • We added the following Filename Include Filter. This filter will check if the xml you need is available.
    Importer_WXII_%TCD:[IncDay+1]MM-DD-YYYY:-#0.xml

    limagito file mover filename filter

    • Important, do not forget to enable ‘Allow parameters in File Name Filter’:

    limagito file mover file filter

    • Set Function to Copy, don’t worry we are not going to do anything with the xml files.

    limagito file mover function setup

    • We added a dummy ‘Pascal Script’ as Destination:
    Begin
    psExitCode:= 1;
    // ... add your code here
    psLogWrite(1, '', 'We found file: ' + psFilePath + psFileName);
    End.

    limagito fil emover pascal script as destination

    • Next, Rule Events setup:

    limagito file mover rule events option

    • Select and enable the ‘On No File Found’ event. We are going to send an email when the xml file is not available.
      • Enable and setup ‘Mail Event’:

    limagito file mover rule events setup

      • Enable and setup ‘Pascal Script’. This will add some info into the log window.
    Begin
    psExitCode:= 1;
    // ... add your code here
    psLogWrite(1, '', 'xml file not available');
    End.

    limagito file mover rule events setup

    • Schedule setup:
      • Disable Timer:

    limagito file mover timer setup

      • Add a Schedule when you would like to check for this xml file.

    limagito file mover scheduler setup

    • You can add multiple Schedules if you want.

    limagito file mover scheduler setup

    #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘monitor if a file doesn’t make it to a directory’ question, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team Events Filters
  • 19 Nov

    How to move files based on data from a csv file

    How to move files based on data from a csv file

    Q: I have the Limagoto X software installed, and I would like to know if it’s possible to move files, based on some information from a csv file? I have an csv file with some order numbers, and the folders I want to move, are label with these order numbers.

    A line in the csv file would look like this:

    The file structure looks like this:

    limagito file mover folder structure example

    So I would have to extract “D” first letter of “Donald Duck” -> then look in folder “Donald Duck”\ordre and search for 9999999 and move that folder to a new location with the same folder structure.

    A: We asked and received a dummy csv file, data content lookes like:

    Art;Ordrenr.;Arkiveret;Arkivdato;Jobnavn;Kundenavn;Statuskode;Ordretype;S‘lger;Ordrestyrer
    Ordre;9876543;SAND;17-11-2023;Arkiveringstest;Limagito Complete;AABEN_ARKIV;ARK;TEAM-E;MHOE

    So in this example:

    • We would strip the first char of the ‘Kundenavn’ field:  L
    • Next it would be the full name of the same ‘Kundenavn’ field:  Limagito Complete
    • Add fixed text:  Ordre
    • And finally the value of data field ‘Ordre’:  9876543

    Result as Directory filter: *\L\Limagito Complete\Ordre\9876543\*

    • As source we used a Windows folder, root folder to start from is ‘Jobs’ :

    limagito file mover windows folder as source

    • Next we’ll need to add a ‘Pascal Script’ to strip data from the csv file and use it as directory filter:

    limagito file mover pascal script option

    • Enable and add the following ‘On Rule Begin’ Pascal Script:

    You can download the script: here

    Do not forget to adjust the ctDataPath const (must end with a \ ). In this path we’ll search for .csv data file(s) with a date structure in its filename like ‘YYYY-MM-DD’. This can, of course, be adjusted.

    limagito fil emover move files based on data from a csv file

    • Directory filter setup:

    limagito file mover directory filter setup

    The %VSA (= Var String A) configured by the previous script will be used as ‘Directory Name Include Filter’:

    limagito file mover directory filter

    This ‘Allow parameters in Directory Name Filter’ option should be enabled by default:

    limagito file mover directory filter

    • As Destination we used a Windows folder:

    limagito file mover windows folder as destination

    • RunTime log result:

    limagito file mover runtime log result

    #csv #managedfiletransfer #filetransfer #filemanagement

    If you need any help with this ‘move files based on data from a csv file’ request, please let us know.

    Best Regards,

    Limagito Team

1 2 3 4 5 6 7 9
SEARCH