I'm trying to search for a certain file extension, .pro. I have tried the following searches in the search bars: type:.pro and *.pro, however, both of these queries yield files with the extension .properties and .project. I don't want these in my results. how do I exclude these?
Asked
Active
Viewed 2,745 times
1
tuskiomi
- 854
1 Answers
2
I'm trying to search for a certain file extension, .pro
I have tried the following searches in the search bars: type:.pro and *.pro, however, both of these queries yield files with the extension .properties and .project.
This is not possible using the Windows Explorer search bar, even when using Advanced Query Syntax.
However, it can be achieved in a cmd shell, with the following command:
dir /b /s | findstr /e /l /c:".pro"
Example:
> dir /b /s *.pro
F:\test\.pro
F:\test\test.pro
F:\test\test.profile
F:\test\test.properties
F:\test\test.project
> dir /b /s | findstr /e /l /c:".pro"
F:\test\.pro
F:\test\test.pro
Further Reading
- An A-Z Index of the Windows CMD command line
- A categorized list of Windows CMD commands
- dir - Display a list of files and subfolders.
- findstr - Search for strings in files.
DavidPostill
- 162,382