n = CountDirectoryEntries(id[, what])
id. This directory must have been opened using OpenDirectory() or @DIRECTORY before.
The optional argument
what can be used to specify what kind of entries should be counted. The
following entry types are currently supported:
CountDirectoryEntries() will iterate through all entries in the directory
so it must not be used during an iteration using NextDirectoryEntry().
Doing so will automatically rewind any existing directory iterations.
OpenDirectory(1, "data") NPrint(CountDirectoryEntries(1))The code above prints the number of files in the directory