You are here: Function Reference > Alphabetical Listing > F > FileDrive

FileDrive

Use this function to get the drive component of a file name.

Syntax

FileDrive (FullFileName)

Parameter

Description

FullFileName

Enter a string that contains a fully qualified file name, such as:

"d:\mypath\myfile.ext"

The system returns a string that contains the drive component of that file name.

Example

Here is an example:

MYDRIVE = FileDrive("d:\mypath\myfile.ext")

In this example, MYDRIVE would contain:

"d:"

See also