Filter, allow REGEX match.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rouche
    Visitor
    • Nov 2017
    • 4

    Filter, allow REGEX match.

    Hello,

    I use BC since 10 years i think as my best comparison tool.

    One thing that i find really annoying theses days is folder compare Filtrs. When you work with nodeJS, you have those huge amount of node_modules that one side have and not the other because you did not execute npm install (And you DONT want)

    So i have a directory with 100+ subdirectory inside it i want to filter them ALL but one!

    Simple regex would be so cool like ^node_module/(?!my_project_dir).*$

    Thanks!
  • Chris
    Team Scooter
    • Oct 2007
    • 5526

    #2
    Thank you for the suggestion, I'll add regular expression name filters to our feature request list.

    The current File Filter Masks do support some wildcards in case the filter you want can be accomplished in the current version. See the File Masks topic in the help file for details.
    Chris K Scooter Software

    Comment

    • Rouche
      Visitor
      • Nov 2017
      • 4

      #3
      I tryed a lot, i was hoping but sadly theres no way to make something like:
      node_module except node_module/my_project

      Comment

      • Chris
        Team Scooter
        • Oct 2007
        • 5526

        #4
        Instead of filtering out folders, you can try using an inclusion filter.

        -.\*;.\node_module\my_project\

        The above filter will only include files and subfolders of .\node_module\my_project\, it will also filter out files that are in the root of the base folder.
        Chris K Scooter Software

        Comment

        • Rouche
          Visitor
          • Nov 2017
          • 4

          #5
          Regex is not the right solution then.
          Still struggling tough because node_modules is not at base its inside a hierarchy.

          Lets say we have


          a-
          _|-b
          ___|-node_modules
          ________|-my_project


          Worst case this would do the job but sadly middle folders are not included.
          . <= ok.
          .\a\. <= not included
          .\a\b\. <= not included
          .\a\b\node_modules\my_project\ <= ok

          Comment

          • Chris
            Team Scooter
            • Oct 2007
            • 5526

            #6
            Use the ...\ filter prefix to include a folder name at any depth in the tree.

            Filter: ...\my_project\

            Will include:
            .\a\b\my_project\
            .\a\my_project\
            .\my_project\
            Chris K Scooter Software

            Comment

            • Rouche
              Visitor
              • Nov 2017
              • 4

              #7
              Still wont work. See image below it explain better what i want to exclude in the same session.

              Best solution now is i will create 2 Compare session.
              - one starting at root and exclude node_modules
              - one starting at node_modules/my_project

              Thanks for the help.

              Green arrow is what i want to keep, in red what needs to be excluded.
              https://imgur.com/1Xk4Pys

              Comment

              • Aaron
                Team Scooter
                • Oct 2007
                • 15938

                #8
                Hello,

                BC4's filtering does not support a conditional definition to include items within an excluded item. If you define multiple filters, you could include the specific subfolders and the toplevel items, or exclude the specific sublevel items. However, two sessions is probably the easier solution with simpler filter rules.
                Aaron P Scooter Software

                Comment

                Working...