Difference between revisions of "ADIR()"

From Lianjapedia
Jump to: navigation, search
Line 10: Line 10:
 
==Description==
 
==Description==
 
The ADIR() function returns the number of files which match the specified file skeleton.  The following 'wild card' characters can be used:
 
The ADIR() function returns the number of files which match the specified file skeleton.  The following 'wild card' characters can be used:
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 22: Line 21:
 
|-
 
|-
 
|}
 
|}
 
  
 
The ADIR() function may also be used to load directory information into arrays.
 
The ADIR() function may also be used to load directory information into arrays.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 43: Line 40:
 
|-
 
|-
 
|}
 
|}
 
  
 
==Example==
 
==Example==

Revision as of 08:40, 16 November 2011

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)