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>findfirst() - find first matching file</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     findfirst() - find first matching file
  Usage:    <string> = findfirst(<skeleton>,[<attrib>])
  Params:   string <skeleton> - file specification to search for
            integer <attrib> - attribute to use in the search,
            optional. If no attribute is given, the default is 0
            for all normal files

            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:  string equal to first filename that matches <skeleton>

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

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

            * or load an array with subdirectory names

  Example 2:     ndir = filecount("*.*",16)
                 declare dirarray[ndir]
                 temp = findfirst("*.*",16)
                 for n = 1 to ndir
                      dirarray[n] = temp
                      temp = findnext()
                 next


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

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