RAD Studio VCL Reference
SysUtils.ExtractFileDir Function

Extracts the drive and directory parts from FileName.

function ExtractFileDir(const FileName: string): string; overload;
AnsiString ExtractFileDir(const AnsiString FileName);

The resulting string is a directory name suitable for passing to the CreateDir, GetCurrentDir, RemoveDir, and SetCurrentDir functions. This string is empty if FileName contains no drive and directory parts.

Note: This function works for multi-byte character systems (MBCS).

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!