Sunday, 15 April 2012

cmd - findstr exclude some subdirectories -


I'm using the searcher / s to find what I'm looking for. How do I remove some sub directories? For example, the main directive -> sub folder 1, sub folder 2, sub folder 3, sub folder 4

  searchst / s / i / c: "SWG_DD_STANDARD_DATE" *. * & Gt; E: \ Personal \ ORA_APPS_DEV \ WO_WIP \ ONE_OFF \ NARAIN_ALL \ search \ search.txt  

How can I remove sub folder 2 from my search?

You can iterate the list of folders and exclude one without the need of the

(/ d %% a in * *) C: "SWG_DD_STANDARD_DATE" "%% a \ *")); E: \ Personal \ ORA_APPS_DEV \ WO_WIP \ ONE_OFF \ NARAIN_ALL \ Search \ search.txt

Or, if Only the output folder is to be excluded, you can filter it

  searchst / s / i / C: "SWG_DD_STANDARD_DATE" * | searchst / V / b / I / C: "subfolder 2"> E: \ personal \ ORA_APPS_DEV \ WO_WIP \ ONE_OFF \ NARAIN_ALL \ Search \ search.txt  

No comments:

Post a Comment