MIAMEX 23: End directory search

Updated June 2011

xcall MIAMEX, MX_FINDEND

The A-Shell directory scanning system only permits the scanning of one directory at a time with the use of the MX_FINDFIRST and MX_FINDNEXT functions. Once the processing of that directory has been completed, then the MX_FINDEND function must be used to terminate and free up any data areas associated with the scan. The recommended logic for scanning a directory is:

xcall MIAMEX, MX_FINDFIRST, path, status, filename, size, attrib

 

do while STATUS = 0

    ....

    .. Process directory item here

    ....

    XCALL MIAMEX, MX_FINDNEXT, status, filename, size, attrib

loop

 

! terminate directory search and free resources

xcall MIAMEX,MX_FINDEND

 

See the History note in MX_FINDFIRST.