Can I use a wildcard to denote subdirectories as opposed to just files in the Windows Command Prompt
Posted
by Dinosaurus
on Super User
See other posts from Super User
or by Dinosaurus
Published on 2010-04-26T20:15:04Z
Indexed on
2010/04/26
20:24 UTC
Read the original article
Hit count: 257
I know I can use a wildcard to list the files in a single directory:
dir *.java
However, does anyone know if it is possible to denote a subdirectory with a wildcard as well?
I would like to do something like
dir classes/
*/
*.java
Where, it will list all the java files in every subdirectory beneath the classes directory.
So, if there is:
classes/cs1100/
classes/cs1200/
classes/cs1500/
It will list all the java files within these.
Note, I'm not using this specifically for the "Dir" command, but instead another command line tool that accepts a list of files. But, if it works for Dir, it shoudl work in my other program as well.
© Super User or respective owner