Filters

  • 01 Aug

    How to delete Folders based on the name of the folder

    Q: How to delete Folders based on the name of the folder.

    The schema is:

    username_YYMMDD-HHMMSS

    is it possible to extract the date and use it as condition to check if it is older than x days and than delete the folder and all of its content?

    limagito file mover delete Folders based on the name

    A: Yes, this is possible using some Pascal Script.

    • Source should be a Windows Folder or Share. We used the following folder as Source:

    limagito file mover windows folder as source

    Or test content looks like:

    limagito file mover Delete Folders based on date in Folder Name

    • Pascal Script Setup

    limagito file mover pascal script option

    • Enable ‘On Rule Begin’ Pascal Script option and copy/paste the script from here: link
      • Do not forget the adjust the ctOlderThanDay Const value. We used 500 days.
      • The Date format we used was YYMMDD

    limagito file mover pascal script setup

    • File Filter Setup

    limagito file mover file filter setup

    • Directory Setup

    limagito file mover directory setup

    • The %VSA (= Var String A) is used as directory filter. The previous Pascal Script will add the Subfolders to delete (older than x days) into this var.

    limagito directory setup

    • Function Setup

    limagito file mover function setup

    • RunTime Log Result:

    limagito filemover runtime log result

    • Source Content Result:

    limagito filemover delete Folders based on the name

    If you need any help with this ‘delete Folders based on the name’ request, please let us know.

    Best Regards,

    Limagito Team

    #managedfiletransfer #filetransfer #filemanagement

  • 18 Mar

    Strip date from filename filter and move files older than the x days

    Strip date from filename filter and move files older than the x days

    Q: I want to make a file filter-> regex filter able to move files older than the current date -n to another folder.

    The files i question are named like this: hjernetrim-quiz-helside_2025-01-28.pdf (hjernetrim-quiz-helside_yyyy-mm-dd.pdf)

    I can’t figure out how to use the regex Filter. I have no luck with this: hjernetrim-quiz-helside_TCD:[IncDay-5]yyyy-mm-dd:
    Can you help me finding the correct filter syntax?
    A: In this case we are going to strip the date part from the filename and convert it to a Date. Afterwards we’ll compare this with the current date and when older than 5 days we’ll allow the file to be moved. We are not going to use a file filter for this but instead use a little script.
    • First setup your Source, we used a Windows folder as Source:
    limagito file mover windows folder as source
    • Open our Pascal Script option:
    limagito file mover pascal script option
    • Enable and add the following ‘On Destination’ script:  link
      • You can adjust the ctOlderThanDays Const if needed. At the moment it is set to 5
    limagito file mover strip date from filename
    • As Destination we used a Windows Folder:

    limagito file mover windows folder as destination

    • RunTime Log Result:

    limagito file mover runtime log result

    If you need any help with this “strip date from filename filter”, please let us know.

    Best Regards,

    Limagito Team

    #managedfiletransfer #filetransfer #filemanagement

  • 11 Oct

    How to move two linked files at the same time

    How to move two linked files at the same time

    Q: I have a particular issue and maybe you have an answer? I need to build in a delay in the moving of files. Each time it involves 2 linked files that must be moved at the same time, the next move of 2 files may only occur when the schedule is triggered again. It is about O and R in filename files. It happens that several are created in 1 minute. However, I want 1 set of O and R files per running move rule to be moved. Do you have a magnificent solution for this that I can implement in the rule?

    limagito filemover move two linked files

     

    A: This should be possible using our Pascal Script option. Please have a look at the following blog article.

    • We used a Windows folder as Source:

    limagito file mover windows folder as source

    • Since we should copy only one set of files (linked O and R files) during each scan, we adjusted the ‘Max. Files processed in One Scan’ to 2.

    limagito file mover maximum files processed in one scan

    • Open our Pascal Script option:

    limagito file mover pascal script option

    • Enable and Add the following ‘On Rule Begin’ Pascal Script:
      • The scripts are available at the following link

    limagito file mover pascal script setup

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

    limagito file mover move two linked files pascal script

    • The Function is set to ‘Move’:

    limagito file mover function setup

    • As Destination we also used a Windows folder:

    limagito file mover destination setup

    limagito file mover windows folder as destination

     

    If you need any help with this ‘move two linked files’ question, please let us know.

    Best Regards,

    Limagito Team

    #managedfiletransfer #filetransfer #filemanagement

1 2 3 4 10
SEARCH