How do I only go 2 directory levels down.

0 votes

I know I have the answer to this and it involved a regexp line, but I can't find it. I want to look down only two directory levels from where when I start the search. I have a directory: c:\EDI\ that's where it starts, from there I have facility folders C:\EDI\Phillips, C:\EDI\Medford, then each of those has a history folder. There are more directories under the history folder, but I just want to stop looking in each structure's history folder.

Thank you.

asked Oct 2 by dbrs4me (70 points)

1 Answer

+1 vote
Best answer

Using a Location Filter you can limit the depth based on the number of back slashes in the path, e.g. to only search folders at the second depth we add a regular expression to EXCLUDE paths with four or more back slashes, e.g.

Look In: C:\EDI;-:regex:(.*\\){4,}

If, however, you simply want to exclude paths with 'history' in the name you could use this:

Look In: C:\EDI;-history
answered Oct 2 by dave (50,950 points)
edited Oct 3 by dave