Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - findfext() return the extension of a file after a file find http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 findfext()          Return the extension of a file after a file find
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   func char findfext extern

 Arguments
   None.

 Return
   The extension of the file.

 Description
   The findfext() function returns the 3 character extension of the file
   found by the findfirst() or findnext() functions.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   // List all executable files (.exe, .com, and .bat), hidden and normal
   
   proc Test_findfext
   vardef
      char cExt
   enddef
   ? "Executable files"
   if findfirst( curdir( 0 ) + "\*.*", FIND_ARCHIVE )
      repeat
         cExt := findfext()
         if cExt == "BAT" .or. cExt == "COM" .or. cExt == "EXE"
            ? findfstr()
         endif
      until .not. findnext()
   endif
   endproc

   proc main
   Test_findfext()
   endproc

See Also: findfattr() findfdate() findfsize() findfstr() findftime()

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