How to expand file wildcards such as *.txt and *.*

By: mykle hoban

Abstract: This document describes how to handle wiildcards in a Win32 Console application.


How can I handle wildcards such as *.* and *.txt in a console application?


This is a lot simpler to do that you might think. Instead of parsing the wildcard and then doing findfirst, etc. All you need to do is link in the file wildargs.obj (add it to your project). This file automatically replaces the normal startup code and will fill in argv with the expanded list from a wildcard.

Server Response from: ETNASC04