Finding multiple file extensions in command prompt window
I am trying to use multiple parameters to find 3 different extensions in my windows/system32 in one command: .exe
, .dll
and .sys
This is giving me what I want, but I can't figure out how to get all 3 extensions in a single command:
dir c:\windows\system32\*.dll /p
This will do it in a single command:
dir /p c:\windows\system32\*.exe c:\windows\system32\*.dll c:\windows\system32\*.sys
A lot of people dont realize that you can have multiple sources in the dir command
If you mean listing files that have one of three extensions, you should start with:
dir *.exe *.dll *.sys
make this a batch file (.bat) and run it from the command prompt
@echo off
dir c:\windows\system32\*.dll
pause
dir c:\windows\system32\*.exe
pause
dir c:\windows\system32\*.sys
Another option is to Change Directory &&
then do the lookup
cd c:\windows\system32 && dir *.exe *.dll *.sys
Saves a bit of typing...