Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

migrated from Oct 20 '10 at 2:07

This question came from our site for professional and enthusiast programmers.

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

share|improve this answer

If you mean listing files that have one of three extensions, you should start with:

dir *.exe *.dll *.sys
share|improve this answer
I have to find all files with those 3 extensions with a pause between screens /p all in one command prompt – Anonymous Oct 20 '10 at 2:06
FWIW, "dir c:\windows\system32\*.dll c:\windows\system32\*.exe c:\windows\system32\*.sys /p" works on Windows 7 – Arnold Spence Oct 20 '10 at 2:55
dir *.exe *.dll *.sys /s /p will search all subdirectories with a pause in between each screen – Enigman Jan 23 '13 at 4:01

make this a batch file (.bat) and run it from the command prompt

@echo off

dir c:\windows\system32\*.dll
dir c:\windows\system32\*.exe
dir c:\windows\system32\*.sys
share|improve this answer
I upvoted, not sure if a batch file satisfies his requirement though. My answer would definitely work – Keltari Jan 23 '13 at 3:55

You must log in to answer this question.