... in relative file masks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Carsten
    Journeyman
    • Oct 2015
    • 18

    ... in relative file masks

    Hi,

    the BC4 help has these two examples for relative file masks:
    Example: Windows\*.txt would affect any text file in any included folder named Windows.
    Example: ...\Windows\*.txt would affect any text file in any folder named Windows.
    But what is the difference?

    "..." in the second example means "zero or more parent folders", whereas the first example seems to mean "Windows\*.txt, wherever this relative relationship appears in the folder tree" -- but the result in both cases is the same, isn't it?
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    The first example is "wherever this relative relationship appears" but also the parent items must be included. If no other filters were in place, it would not match on Basefolder:
    subfolder\Windows\*.txt

    Since, while Windows\*.txt is included, the filter does not include subfolder\. Since Subfolder is excluded, then Windows\*.txt would be as well. If you had a second filter of subfolder\, then the combination would allow it to be included. Or you can use the ...\ filter to match on any path leading to the defined folder.
    Aaron P Scooter Software

    Comment

    • Carsten
      Journeyman
      • Oct 2015
      • 18

      #3
      Ahhh, I think I got it. The "real" problem is that I was only ever using exclude filters, and have never used include filters, and thus when I saw a filter like Windows\*.txt always assumed that both an include or an exclude filter could be meant, whereas in communication with everyone else, the exclude filters should always have an explicit minus prefix everywhere -- except in the related dialog input field...

      Still, let me try to recapitulate: Assume a folder structure below the basefolder like this:
      Code:
          subfolder1\Windows\*.txt          [a]
          subfolder2\subsub\Windows\*.txt   [b]
          Windows\*.txt                     [c]
      Then (filters now properly prefixed with nothing for include filters and minus for exclude filters):
      • .\Windows\*.txt matches [c]
      • Windows\*.txt matches [c]
      • subfolder1; Windows\*.txt matches [a] and [c]
      • ...\Windows\*.txt matches [a], [b] and [c]

      Now some exclude examples:
      • -.\Windows\*.txt matches [a] and [b], excluding [c]
      • -Windows\*.txt matches nothing, excluding [a], [b] and [c]
      • -...\Windows\*.txt matches nothing, excluding [a], [b] and [c]


      (Especially the last two seem identical, both excluding [a], [b] and [c] -- this is what I really meant before I became aware that I should have added the minus prefix right from the start.)

      Right?

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16002

        #4
        Sorry for the delay. But yes, an item will appear if it is part of the Include filter but not Excluded. Once you define an Include, then any items you want visible must be part of the Include.
        Aaron P Scooter Software

        Comment

        • Carsten
          Journeyman
          • Oct 2015
          • 18

          #5
          Thank you!

          Comment

          Working...