Function EN Version 2.00

@ScanOSDirectory

Attachments OSFile Search

Syntax

@ScanOSDirectory(OSMATCHPATH1;OPTIONS1);
@ScanOSDirectory(OSMATCHPATH1;OPTIONS1;OPTIONS2);
@ScanOSDirectory(OSMATCHPATH1;OPTIONS1;OPTIONS2;FNFLAGS1);
@ScanOSDirectory(OSMATCHPATH1;OPTIONS1;OPTIONS2;FNFLAGS1;TEXTPATHADD);

Description

Scans a directory for the files it contains.
In TEXT OSMATCHPATH specifies the OS path with the search criteria (wildcards…).

In TEXT OPTIONS1 can be used to specify the file attributes that the files to be searched may have may have. Files that have additional attributes set are not included in the result list.

In TEXT OPTIONS2 can additionally be used to specify the file attributes that the files to be searched must have in all cases must have. Files that have fewer attributes set are not included in the result list.

In TEXT TEXTPATHADD can be used to specify text that is prepended to each element of the returned result list.

OPTIONS1:
A   May have the archive attribute
D   May have the directory attribute
S   May have the system attribute
H   May have the hidden attribute
R   May have the read-only attribute

OPTIONS2:
A   Must have the archive attribute
D   Must have the directory attribute
S   Must have the system attribute
H   Must have the hidden attribute
R   Must have the read-only attribute

FNFLAGS1:
0   The data type of the returned variable is TEXTLIST (default value).
1   The data type of the returned variable is VHUGETEXTLIST.

Example: @ScanOSdirectory(OSMATCHPATH1;OPTIONS1):

List:=@ScanOSDirectory("C:\\TESTDIR\\*.*";"AR");

Returns a list of all files in the C:\TESTDIR directory where the files found either have no attribute, the archive attribute, or the read-only attribute set.

Example: @ScanOSdirectory(OSMATCHPATH1;OPTIONS1;OPTIONS2):

List:=@ScanOSDirectory("C:\\TESTDIR\\*.*";"ASH";"S");

Returns a list of all files in the C:\TESTDIR directory where all files found have the system attribute set. In addition, the archive attribute or the hidden attribute may also be set.

Note : This text was machine-translated and may contain inaccuracies.