ExtractFilePath

Syntax:

%ExtractFilePath(Str)%

Description: 

Returns the drive and folder portions of a file name. The resulting string is the left-most characters of the file name, up to and including the colon or backslash that separates the path information from the name of the file and its extension. The resulting string is empty if FileName contains no drive and folder parts.

For instance, if the complete path and file name specified was:

c:\temp\foldername\myTask.aml

This extended function would return:

c:\temp\foldername

Parameters:

Parameter

Description

Str

A text string containing the full path from which the path should be extracted.

Example:


Sub Main
'will return c:\foldername

  MsgBox ExtractFilePath("c:\foldername\filename.txt")
End
Sub


See Also:

ExtractFileName