top of page

findstr command to filter out files with given extension


If you want to get a list of all of the files in a directory other than those with a given file extension you can do so using the findstr command with a /vi switch.

dir | findstr /v ".pdf"

The dir command feeds in a directory list to the findstr search command and the /v switch filters the data with the value listed in quotes.

In this example the 'MyData' folder has 10 pdf files which are excluded from the list that is generated.


Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

​

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

​

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page