Products Downloads


French version


 

 

This function initializes the search for the files in a directory that match a search mask. It is used in conjunction with the VaToolBxFindNext and VaToolBxFindClose functions.

 

The resources are implicitly released when you execute a complete loop (VaToolBxFindNext is executed in a loop until the search is finished). If you want to interrupt the search without browsing through all the results, you must explicitly release the resources using VaToolBxFindClose.

 

Context

  • Windows client,

  • Windows server,

  • Mobile client,

  • Mobile server,

  • Java client,

  • Java server,

  • Adelia Web client,

  • Adelia Cloud client.

 

Parameters

NUM_BIN_4

Handle

Search handle used to iterate the search in VaToolBxFindNext.

Output parameter.

The search was successful if Handle has a value other than zero.

ALPHA(n)

Joker

Search mask.

* replaces any sequence of characters.

? replaces any one character.

Example: 'C:\TEMP\*.TXT'

ALPHA(n)

File

Name of the first file found by the search.

ALPHA(5)

Attributes

File attributes.

Possible values:

Attributes(1)

File type (F for file or D for Directory).

Attributes(2)

Read only (R for Read only, - for unspecified).

Attributes(3)

Archive (A for Archive file, - for unspecified).

Attributes(4)

System (S for System file, - for unspecified).

Attributes(5)

Hidden (H for Hidden file, - for unspecified).

 

The Java version is only able to test two attributes (i.e. the file type - file or directory - and the hidden file attribute). As the other attributes are not portable between platforms, they are not specified.

 

 

 

 

Example

NUM_BIN_4

Handle

ALPHA(50)

Joker

ALPHA(256)

File

ALPHA(5)

Attributes

 

 

* Searches for all '.txt' files in the 'c:\temp' directory

Joker

= 'c:\temp\*.txt'

CALL_DLL

'VaToolBx' 'VaToolBxFindFirst' Handle Joker File Attributes

DO_WHILE

Handle <> 0

* Processes the <File> file…

CALL_DLL

'VaToolBx' 'VaToolBxFindNext' Handle File Attributes

REDO

 

* Note: There is no need to explicitly call VaToolBxFindClose

*           as all the results have been processed.

 

 

List of the VaToolBx functions by topic

↑ Top of page

  • Aucune étiquette