Главная страница | назад





Article #26508: How to expand file wildcards such as *.txt and *.*

Question

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

Answer

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.

Last Modified: 30-JAN-01