FILESFREE() Specifies the number of files you can open ------------------------------------------------------------------------------ Syntax FILESFREE() --> nFreeHandles Returns FILESFREE() returns the number of available handles. Description This function returns the number of available handles that correspond to the number of files you can open. This enables you to avoid DOS error 4. Note . Immediately after you start a Clipper application, a value -- smaller than that of FILESMAX() -- is returned. This happens because the operating system and application itself is already using handles. Examples . Can I still open a file? IF FILESFREE() > 0 // At least 1 handle free? USE CUSTOMER // Open a file ENDIF . Be careful when you open multiple indexes at the same time! IF FILESFREE() > 1 // At least 2 handles free? USE CUSTOMER INDEX CUSTNR // Open 2 files ENDIF
See Also: FILESMAX()