Description |
The PathString string is returned with the file name and extension, if present, removed. The directory is the name of a directory or folder that may contain files.
|
|
Microsoft MSDN Links |
System.IO
System.IO.Path
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
uses
System.IO;
var
PathString : String;
begin
PathString := 'C:\Delphi\Testing\DelphiBasics.txt';
Console.WriteLine('"{0}" has directory name "{1}"',
PathString,
System.IO.Path.GetDirectoryName(PathString));
Console.Readline;
end.
| Show full unit code | "C:\Delphi\Testing\DelphiBasics.txt" has directory name "C:\Delphi\Testing"
|
|
|
|