1, the path taken like ExtractFilePath
1, ExtractFilePath like return path
ExtractFileDrive: return to drive the full file name, such as "C:"
ExtractFilePath: return path full file name, and finally with a "/", such as "C: \ the Test \"
ExtractFileDir: return path full file name, and finally without "/", such as "C: \ the Test"
ExtractFileName: returns the file name (with extension) the full file name, such as "mytest.doc"
ExtractFileExt return file extensions complete file name (with a.), such as ".doc"
Procedure TForm1.btn1Click (Sender: TObject); var sFileName: String ; the begin sFileName: = ' F.: \ ZY \ SVN \ projects \ Software 1 \ _ formal source 1 \ LEM_Client \ bin \ SC_WRAMR.exe ' ; Memo1.Lines the .append (ExtractFileDrive (sFileName)); // F: Memo1.Lines.Append (ExtractFilePath (sFileName)); // F: \ ZY \ SVN \ projects \ 1 software \ 1 source code _ the official \ LEM_Client \ bin \ Memo1 .Lines.Append (ExtractFileDir (sFileName)); // F: \ ZY \ SVN \ projects \ 1 software \ 1 source code _ the official \ LEM_Client \ bin Memo1.Lines.Append (ExtractFileName (sFileName)); // SC_WRAMR. EXE Memo1.Lines.Append (ExtractFileExt (sFileName)); //.exe End ;