Announcement

Collapse
No announcement yet.

Please improve documentation about script command filter.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please improve documentation about script command filter.

    I use a script for an important task, script that You helped me with, thanks.
    In this script I use the command
    Code:
    filter "FOOBAR_*.TXT"
    to select files that have to be handled (copied and other things).
    Now, I saw that in the source folder somebody might add files with similar names, that I want to exclude, so I put another command
    Code:
    filter "-FOOBAR_TEST_*.TXT"
    Using the new version of this script I saw that it copied ALL files, not only "FOOBAR_*.TXT".
    This means that the second FILTER command overwrites the first one and so it only excludes "FOOBAR_TEST*.TXT" so ALL other files are handled.
    I have fixed this using one single command
    Code:
    filter "FOOBAR_*.TXT;-FOOBAR_TEST_*.TXT"
    and in this way it seems to work.
    Reading again the manual I saw that I had not understood this, my fault.
    But, it might be useful if You could improve the documentation at least for this part.
    Specifying that if You put two FILTER lines the second one wins.
    And describing how to use for example two cutoffs.
    How can I say that I want to see only files that are two weeks old?
    So I do not want to see files that are older that 14 days, but I do not want to see files that are newer than 7 days?
    Must I write two lines, or a single one?
    How to combine name filters and cutoffs?
    And so on.
    Maybe You already have described this and I did not notice it.

    Thank You very much and regards

    Rodolfo Giovanninetti


  • #2
    Thanks. Improving and adding examples is always something we can do for our documentation. Each filter command of the same type (name, cutoff, etc) sets that command singularly, similar to how you can "load" a pair of items, generate a report, then "load" another set of items. Each filter command also includes a method to reset, such as "none". This allows script to continue as a series of sequential steps that can be followed.

    For cutoff, the syntax you are looking for is:
    filter cutoff:<14days cutoff:>7days

    For combining name filters and cutoff, these can be separate lines, as the filter <type> differs.
    filter "*.pdf"
    filter cutoff:<14days cutoff:>7days
    load "c:\target1" "c:\target2"
    sync update:left->right
    Aaron P Scooter Software

    Comment

    Working...
    X