Article ID: 195407
Article Last Modified on 8/13/1999
Function Name Description
-----------------------------------------------------------------------
ADDBS( ) This function adds a backslash (if needed) to a
path expression.
AGETFILEVERSION( ) This function creates an array containing
information about files with Windows version
resources such as .exe, .dll, and .fll files, or
automation servers created in Visual FoxPro. This
function corresponds to the GetFileVersion( )
function in Foxtools.
The following example displays Vfp6.exe file
information:
AGETFILEVERSION(myArray,SYS(2004)+"VFP6.EXE")
DISPLAY MEMORY LIKE myArray
DEFAULTEXT( ) This function returns a file name with a new
extension if one does not already exist. This
function does not physically add a new extension to
the file, it merely returns the new virtual
extension if the file has no extension.
For example:
StrToFile("testtext", "test") && Creates a file
&& called
&& test (no extension).
?DefaultText("test", "txt") && Returns "test.txt"
DRIVETYPE( ) This function returns the type of the specified
drive. This value is numeric with the following
descriptions:
Number Drive Type
-------------------------------------------
1 No type
2 Floppy disk
3 Hard disk
4 Removable drive or network drive
5 CD-ROM
6 RAM disk
FORCEEXT( ) This function returns a string with the old file
name extension replaced by a new extension. This
function is similar to DefaultExt.
FORCEPATH( ) This function returns a file name with a new path
name substituted for the old one.
JUSTDRIVE( ) This function returns the drive letter from a
complete path.
JUSTEXT( ) This function returns the three-letter extension
from a complete path.
JUSTFNAME( ) This function returns the file name portion of a
complete path and file name.
JUSTPATH( ) This function returns the path portion of a
complete path and file name.
JUSTSTEM( ) This function returns the stem name (the file name
before the extension) from a complete path and file
name.
For example:
cFileName = SYS(2004)+"VFP6.EXE"
?JUSTDRIVE(cFileName)
?JUSTEXT(cFileName)
?JUSTFNAME(cFileName)
?JUSTPATH(cFileName)
?JUSTSTEM(cFileName)
Keywords: kbinfo kbxbase KB195407