[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-------------+############################################################
#+-| FIND_FEXT() |-----------------------------------------------+############
#| +-------------+ Returns a 3 character extension from the file |############
#+---------------------------------------------------------------+############
##############################################################################
##############################################################################
#+--| Summary |----------------+##############################################
#| #INCLUDE system.hdr |##############################################
#+-----------------------------+##############################################
##############################################################################
##############################################################################
#+--| Syntax |-------------------------------+################################
#| FUNCTION CHAR find_fext PROTOTYPE |################################
#+-------------------------------------------+################################
##############################################################################
##############################################################################
#########+---| Description |----------------------------------------+#########
#########| The find_fext() function returns a 3 character extension |#########
#########| from the file found by the find_first() or find_next() |#########
#########| functions. |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * List all executable files (.exe, .com, and .bat) |#########
#########| * ... hidden and normal. |#########
#########| |#########
#########| IF .NOT. find_first( "*.*", 0x22 ) |#########
#########| ? "No executable files found" |#########
#########| RETURN |#########
#########| ENDIF |#########
#########| |#########
#########| REPEAT |#########
#########| z = find_fext() |#########
#########| IF z = "BAT" .OR. z = "COM" .OR. z = "EXE" |#########
#########| ? find_fstr() |#########
#########| ENDIF |#########
#########| UNTIL .NOT. find_next() |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Index a file list by extension |#########
#########| |#########
#########| INDEXDEF |#########
#########| CHAR(3) iext find_fext() |#########
#########| ENDDEF |#########
#########| |#########
#########| {...} |#########
#########| |#########
#########| BUILD "ftemp.dbf" ALIAS tmp |#########
#########| OPEN "ftemp.dbf" ALIAS tmp |#########
#########| INDEX iext |#########
#########| |#########
#########| IF find_first( "*.*", 0x3f ) |#########
#########| REPEAT |#########
#########| APPEND BLANK |#########
#########| REPLACE f->name WITH find_fstr() |#########
#########| UNTIL .NOT. find_next() |#########
#########| ENDIF |#########
#########| |#########
#########| LIST ALL |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
find_fattr()
find_fdate()
find_first()
...
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson