FILE_EXTRACT_EXTENSION$()

FILE_EXTRACT_EXTENSION$(F)

RETURNS A FILE EXTENSION FROM F

  • Type: Function
  • Parameter: 1
  • Group: Files

ACTION

The function FILE_EXTRACT_EXTENSION$(F) returns a file extension from the file expression F.

If there is no extension in the expression F, an empty string is returned.

SYNTAX: Result$=FILE_EXTRACT_EXTENSION$(F)

  • F = name of file.
  • Result$ is a string.

USE

  • The function FILE_EXTRACT_EXTENSION$() is used to extract a file extension from a string.

ERROR

  • If F is not a correct name of file.

EXAMPLE

rem create an open_dialog to point a file

open_dialog 1

rem display as window title the extension of chosen file

caption 0,file_extract_extension$(file_name$(1))

SEE ALSO

FILE_EXTRACT_DISK$(F)

FILE_EXTRACT_NAME$(F)

FILE_EXTRACT_PATH$(F)