0

Regex is allowed in the "Search For" and "File Names match" fields in grepWin. I would also like to use regex to specify the list of paths in the "Search in" field. Is this supported, and if so, what is the proper syntax?

Currently my "Search In" field contains something like Path1\|Path2\|Path3\ I would like to have something more like Path1\.*\source\|Path2\.*\TestData\ so that I could get all files in all folders named "source" in various subfolders of Path1 and folders named "TestData" in subfolders of Path2 without searching every folder in Path1 and Path2.

The naïve approach would be to explicitly specify all possible paths containing "source" Path1\package1\source\|Path1\package2\source and so forth so that I get all of those "source" directories downstream of Path1 and nothing else but there are many and the list is ever-growing. Also, searching all of Path1 is clearly functional but it could be made significantly faster by reducing the volume of files processed.

I've played around with various attempts to deduce what the syntax might be if regex is supported in this field but I have yet to see any evidence that it's working. The use of '|' as the default separator suggests parsing is happening but regex is either unsupported or supported in some non-standard way so that '|' can behave like it does.

1 Answer 1

0

The grepWin command-line does not support more that one path parameter in any way (and no regex).

The way to solve your problem is to write a batch (.bat) that accumulates all your search folders into one file, then executes grepWin on each folder.

There may be better solutions with other tools, but that's a separate question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .