No announcement yet.

Filter, allow REGEX match.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Filter, allow REGEX match.


    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).*$


  • #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


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


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


        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


        • #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


          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


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

            Filter: ...\my_project\

            Will include:
            Chris K Scooter Software


            • #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.


              • #8

                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