victor2008
asked on
How to explicitly exclude a file or subdirectory from search?
Is there a Dir command line option to search for a file or folder under a directory but exclude a specific subfolder in the search? dir /b /s ??
ASKER
that doesn't seem to work for me but i might be writing it wrong. i'm trying to search all *.pdf files in a directory but exclude one folder under the directory from my search
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
dir /s | findstr "\thestrinyousearching*" |findstr /v "\thefolderyouwanttoexclud