Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2017
    Posts
    4

    Default 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!

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    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. #3
    Join Date
    Nov 2017
    Posts
    4

    Default

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

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    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

  5. #5
    Join Date
    Nov 2017
    Posts
    4

    Default

    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

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    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

  7. #7
    Join Date
    Nov 2017
    Posts
    4

    Default

    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

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,379

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •