Announcement

Collapse
No announcement yet.

Filter, allow REGEX match.

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

  • Rouche
    started a topic Filter, allow REGEX match.

    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!

  • Aaron
    replied
    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.

    Leave a comment:


  • Rouche
    replied
    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

    Leave a comment:


  • Chris
    replied
    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\

    Leave a comment:


  • Rouche
    replied
    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

    Leave a comment:


  • Chris
    replied
    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.

    Leave a comment:


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

    Leave a comment:


  • Chris
    replied
    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.

    Leave a comment:

Working...
X