Is it possible to list all files under a globbed directory using cmd?

  cmd, command-line, windows

For example I have a directory named "Files" which contains a multitude of subdir. But then I only want to list the files inside the subdirs that follow a pattern, for say "2021-07-*"

Is it possible to do this in one line?

I tried using dir /s /b C:UsersXXXXFiles21-07-*. However, it only returned the name of subdirectories that matched the glob. What I need are the files in it.

I’d appreciate any insights on this

Source: Windows Questions

LEAVE A COMMENT