Difference between revisions of "GET FILENAME PATTERN LIST"

From Macros Wiki
Jump to: navigation, search
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.
  
|description=:
+
|param1=<pattern>|param1_desc=Filename pattern, may include <nowiki>? and *</nowiki> characters
 
+
|param2=<num files found>|param2_desc={{parameter_variable_any_name}} the number of matching files.
|param1=<pattern>|param1_desc=
+
|param3=<filename array>|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.
|param3=<filename array>|param3_desc=
 
|param4<nowiki>=[<sub folders>]</nowiki>|param4_desc= 0/1
 
 
}}
 
}}
  
 
===Example===
 
===Example===
:GET_FILENAME_PATTERN_LIST
+
:LOCAL NumFiles, FileList$(100)
 +
:GET_FILENAME_PATTERN_LIST "C:\MyFolder\*.txt", NumFiles, FileList$, 1
 +
 
 
[[Category:Miscellaneous]]
 
[[Category:Miscellaneous]]

Revision as of 18:39, 12 January 2011

Up

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.
Set to 1 to search sub folders.

Example

LOCAL NumFiles, FileList$(100)
GET_FILENAME_PATTERN_LIST "C:\MyFolder\*.txt", NumFiles, FileList$, 1