Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>filecount() - count number of matching files</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     filecount() - count number of matching files
  Usage:    <integer> = filecount(<skeleton>,[<attrib>])
  Params:   string <skeleton> - the file specification to search
            integer <attrib> - optional file attribute to use

            valid attributes are:

                 Bit  - Decimal -    When On

                 0    -    0    -    normal file
                 0    -    1    -    read only
                 1    -    2    -    hidden file
                 2    -    4    -    system file
                 3    -    8    -    volume label
                 4    -    16   -    subdirectories
                 5    -    32   -    archive bit

  Returns:  integer equal to the number of files that match the
            skeleton sent, -1 if error or no files found.

 ---------------------------------- Example ---------------------------------

                 ? filecount("*.dbf") && print number of DBF files

                 nfiles = filecount("*.dbf")
                 if nfiles > 0
                      declare dbfarray[nfiles]
                      temp = findfirst("*.dbf")
                      for n = 1 to nfiles
                           dbfarray[n] = temp
                           temp = findnext()
                      next
                 endif

                 ? filecount("*.*", 16)
                 * prints number of subdirectory entries


See Also: findfirst() findnext() findtime() findsize() finddate()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson