次の方法で共有


FULLPATH( ) Function

Returns the path to a specified file or the path relative to another file.

FULLPATH(cFileName1 [, nMSDOSPath | cFileName2])

Parameters

  • cFileName1
    Specifies the file for which Visual FoxPro searches.

    Note

    Be sure to include the file name extension.

    If the file is located in the Visual FoxPro path, the path is returned with the file name. You can specify the Visual FoxPro path using the SET PATH command.

    If the file cannot be located in the Visual FoxPro path, FULLPATH( ) returns the current directory the path and file name as if the file was located in the current default directory.

  • nMSDOSPath
    Specifies to search the MS-DOS path instead of the Visual FoxPro path. nMSDOSPath can have any numeric value.

    If the file cannot be located in the MS-DOS path, FULLPATH( ) returns the path and the file name as if the file was located in the current default directory.

  • cFileName2
    Specifies a second file name to search for.

    Note

    Be sure to include the file name extension.

    FULLPATH( ) returns the path for the first file relative to the second file.

Return Value

Character. FULLPATH( ) returns a file path.

Remarks

Use the FILE( ) function to verify that the file actually exists; otherwise, if the file does not exist, the function returns the file name with the current directory.

See Also

Reference

DBF( ) Function

FILE( ) Function

LOCFILE( ) Function

SYS(2014) - Minimum Path

Other Resources

Functions

Language Reference (Visual FoxPro)