RAD Studio |  |

Wildcard Arguments
See Also
Collapse All

Command-line arguments containing wildcard characters can be expanded to all the matching file names, much the same way DOS expands wildcards when used with commands like COPY. All you have to do to get wildcard expansion is to link your program with the WILDARGS.OBJ object file, which is included with CodeGear C++.

Note: Wildcard arguments are used only in console-mode applications.
Once WILDARGS.OBJ is linked into your program code, you can send wildcard arguments (such as *.* ) to your main function. The argument will be expanded (in the argv array) to all files matching the wildcard mask. The maximum size of the argv array varies, depending on the amount of memory available in your heap.

If no matching files are found, the argument is passed unchanged. (That is, a string consisting of the wildcard mask is passed to main.)

Arguments enclosed in quotes ("...") are not expanded.

See Also

About The Main Function

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!