How to Expand Filenames on Command Line [Duplicate]

I'm using a batch file to execute an awk program and feed it filenames.

Question: How do I get it to expand the filenames on the command line?

Syntax:

Command.exe *.rpt > out.txt

Exact:

"C:\Users\user\Utilities\mawk.exe" -f "C:\Users\user\My Projects\AWK\EmailSQLResults.awk" C:\Temp\SQL\*.rpt > "C:\Temp\SQL\EmailResults.txt"

Result:

mawk: cannot open C:\Temp\SQL\*.rpt (Invalid argument)

Windows 10. Standard CMD window. mawk 1.3.4 20140914

0
Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest