Welcome Guest, you are in: Anmelden

CP Wiki

RSS RSS

Navigation



  1. Administration

Suche im wiki
»
 » Startseite » netFrame als Plattform Menü » Globale Methoden | » Erweiterte Suche

netFrame-Syntax:
function
ExtractFileName(aFileName: string) : string

Beschreibung:
Die ExtractFileName Funktion extrahiert aus dem aFileName den Dateinamen.

Beispiel:

procedure sample;
 var
  fullFileName : string;
 
begin
  // Set up a full file name with drive and path
  fullFileName := 'C:\Program Files\Borland\Delphi7\Projects\Unit1.dcu';
 
  // Show the component parts of this full name
  ShowMessage('Drive = '+ExtractFileDrive (fullFileName));
  ShowMessage('Dir   = '+ExtractFileDir   (fullFileName));
  ShowMessage('Path  = '+ExtractFilePath  (fullFileName));
  ShowMessage('Name  = '+ExtractFileName  (fullFileName));
  ShowMessage('Ext   = '+ExtractFileExt   (fullFileName));
end;

Ergebnis:

- Drive = C:
- Dir = C:\Program Files\Borland\Delphi7\Projects
- Path = C:\Program Files\Borland\Delphi7\Projects\
- Name = Unit1.dcu
- Ext = .dcu

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam.