Difference between revisions of "ADIR()"

From Lianjapedia
Jump to: navigation, search
Line 46: Line 46:
 
nTables = adir("*.dbf",files)
 
nTables = adir("*.dbf",files)
 
</code>
 
</code>
 
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Array Processing]]
 
 
[[Category:Array Processing Functions]]
 
[[Category:Array Processing Functions]]

Revision as of 09:01, 7 December 2012

Purpose

Function to return number of files matching a file pattern

Syntax

ADIR(<skeleton> [,<array1> [,<array2> [,<array3> [,<array4> [,<array5>]]]]])

See Also

AADD(), AAVERAGE(), ACOPY(), ADEL(), ADESC(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, FDATE(), FILE(), GATHER, IN_ARRAY(), IS_ARRAY(), LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER

Description

The ADIR() function returns the number of files which match the specified file skeleton. The following 'wild card' characters can be used:

Character Description
? Matches any one character.
% Matches any one character.
* Matches zero or more characters.

The ADIR() function may also be used to load directory information into arrays.

Parameters Description
<skeleton> The character string specifying the file skeleton.
<array1> The name of a pre-declared array in which to load the character string file names that match the specified skeleton.
<array2> The name of a pre-defined array in which to load the numeric type file size in bytes of the files that match the specified skeleton.
<array3> The name of a pre-defined array in which to load the date type creation date of the files that match the specified skeleton.
<array4> The name of a pre-defined array in which to load the character type creation time of the files matching the specified skeleton.
<array5> The name of a pre-defined array. This option has been added for compatibility purposes only. An element containing the character string "A" will be loaded for each file that matches the specified skeleton.

Example

declare files[adir("*.dbf")]
nTables = adir("*.dbf",files)