Windows equivalent for Unix find command to search multiple file types

85,459

This will locate all files with the given extensions in the current working directory and all subdirectories:

dir *.cpp *.h *.java /b/s

See https://technet.microsoft.com/en-us/library/cc755121.aspx for more info on using dir.

Share:
85,459
Soumen
Author by

Soumen

Updated on July 05, 2022

Comments

  • Soumen
    Soumen about 2 years

    While having a cygwin installed in windows gives most of unix command, still i was wondering how to search multiple filetypes in one command using windows "find" command.
    ie: find . -name *.cpp -o -name *.h -o -name *.java

    The above command gives me a list of all cpp, h & java, what will be the equivalent using the windows find?