No announcement yet.

More flexible file filters

  • Filter
  • Time
  • Show
Clear All
new posts

  • More flexible file filters

    I have projects where e.g. *.lst files are generated in a folder structure below "build". I want these to be ignored, but not the whole build folder, and not *.lst in other folders. I know that wildcards don't work that way, but if they would then my exclude would look similar to "build\*\*.lst". One solution would be to support regular expressions which are matched to the complete path, so my filter would look like this "build\\.*\\.*\.lst" (this would match e.g. "build\a\x.lst", "build\b\y.lst", "build\a\b\x.lst"etc., but not "div\files.lst" etc. (and with this expression not "build\*.lst"). An other easy and very flexible approach would be to support filter files in the project, like ".cvsignore" (which have in addition the advantage that they are automatically working for all colleagues, without the need of distributing BC setting, and that they still work if I copy the project to an other place).

  • #2
    Have you tried adding an "Exclude Files" filter of "build\*\*.lst"? It should work just fine, though it will only match .lst files that are in direct subfolders of "build". You probably want "build\...\*.lst". The "..." matches zero or more subfolders, so it will match every .lst file within "build".

    I like the idea of supporting .cvsignore, but according to this, building the full list for a specific directory is fairly involved, and it would be different for every version control system.
    Zoë P Scooter Software


    • #3
      ok, the ...\ helps in this case, thanks. But: 1. For other cases regular expression are more flexible. 2. I think the help for "..." under "File Masks" should be changed. Currently it says "Example: ...\Windows\*.txt would affect any text file in any folder named Windows.", but in this example the "..." does not make sense ("Windows\*.txt" has the same effect).