FoxPro JustExt() function

The VFP JustExt() function returns the extension from a string containing a file name. For example:

JustExt ("vfp9.exe")

would return:

"exe"

If the file has no extension, or if the file name just ends in a period, then an empty string will be returned.

As with JustDrive(), JustExt() does not look at the file system or check that the parameter is a properly formed name or path. All that it does is look for the final period in a string and return the characters that follow it.

Note that this implies that the function will return the final extension from a file name that includes two periods and two extensions.

VBA equivalent

Microsoft Access does not have equivalents to these FoxPro file name commands so I wrote this library Visual Basic functions to do give me the same facilities in VBA.

Related Items

FoxPro DefaultExt function

Using DefaultExt() to correct file extensions in a FoxPro program.

Read More

FoxPro ForceExt function

Using ForceExt() to correct file extensions in a FoxPro program.

Read More

FoxPro ForcePath function

Using ForcePath() to correct path names in a FoxPro program.

Read More

FoxPro JustFName function

Using JustFName() to get the file name from a full path and name.

Read More

FoxPro JustPath function

Using JustPath() to get the path from a full file name.

Read More