Difference between revisions of "GET FILENAME PATTERN LIST"

From Macros Wiki
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[|{{Up}}]]
+
[[:Category:Miscellaneous|{{Up}}]]
  
 
{{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=<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>=[<sub folders>]</nowiki>|param4_desc= 0/1
 
 
}}
 
}}
  
 
===Example===
 
===Example===
:GET_FILENAME_PATTERN_LIST
+
:LOCAL NumFiles, FileList$(100)
[[Category:]]
+
:GET_FILENAME_PATTERN_LIST "C:\MyFolder\*.txt", NumFiles, FileList$, 1
 +
 
 +
[[Category:Miscellaneous]]

Latest revision as of 18:41, 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.
[<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