Difference between revisions of "GET FILENAME PATTERN LIST"
From Macros Wiki
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{{Command|syntax=GET_FILENAME_PATTERN_LIST <pattern> <num files found> <filename array> <nowiki>[<sub folders>]</nowiki> | {{Command|syntax=GET_FILENAME_PATTERN_LIST <pattern> <num files found> <filename array> <nowiki>[<sub folders>]</nowiki> | ||
+ | |description=Get a list of filenames matching a pattern that includes wildcard characters. | ||
− | + | |param1=<pattern>|param1_desc=Filename pattern, may include <nowiki>? and *</nowiki> characters | |
− | + | |param2=<nowiki><num files found></nowiki>|param2_desc={{parameter_variable_any_name}} the number of matching files. | |
− | |param1=<pattern>|param1_desc= | + | |param3=<nowiki><filename array></nowiki>|param3_desc={{parameter_array_string_name}} the list of matching files. |
− | |param2=<num files found>|param2_desc= | + | |param4=<nowiki>[<sub folders>]</nowiki>|param4_desc=Set to 1 to search sub folders. Default is 0. |
− | |param3=<filename array>|param3_desc= | ||
− | |param4<nowiki> | ||
}} | }} | ||
===Example=== | ===Example=== | ||
− | :GET_FILENAME_PATTERN_LIST | + | :LOCAL NumFiles, FileList$(100) |
+ | :GET_FILENAME_PATTERN_LIST "C:\MyFolder\*.txt", NumFiles, FileList$, 1 | ||
+ | |||
[[Category:Miscellaneous]] | [[Category:Miscellaneous]] |
Latest revision as of 18:41, 12 January 2011
Command
- GET_FILENAME_PATTERN_LIST <pattern> <num files found> <filename array> [<sub folders>]
Get a list of filenames matching a pattern that includes wildcard characters.
Parameters
- <pattern>
- Filename pattern, may include ? and * characters
- <num files found>
- Name of variable to be set to the number of matching files.
- <filename array>
- Name of string array to be set to the list of matching files.
- [<sub folders>]
- Set to 1 to search sub folders. Default is 0.
Example
- LOCAL NumFiles, FileList$(100)
- GET_FILENAME_PATTERN_LIST "C:\MyFolder\*.txt", NumFiles, FileList$, 1