findstr command to filter out files with given extension

findstr command to filter out files with given extension

February 7, 2020

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. 

 

 

 

 

 

 

Please reload

Some elements on this page did not load. Refresh your site & try again.

Contact Me With Your Litigation Support Questions:

seankevinoshea@hotmail.com

  • Twitter Long Shadow

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