Delphi取得目前檔案位置名稱路徑

[pascal]
// 假如程式路徑在 c:\projects\bin\project1.exe
ShowMessage(‘Drive = ‘+ExtractFileDrive (Application.Exename)); //C:
ShowMessage(‘Dir = ‘+ExtractFileDir (Application.Exename)); //c:\projects\bin
ShowMessage(‘Path = ‘+ExtractFilePath (Application.Exename)); //c:\projects\bin\
ShowMessage(‘Name = ‘+ExtractFileName (Application.Exename)); //project1.exe
ShowMessage(‘OnlyName =’+ChangeFileExt(ExtractFileName(Application.Exename), ”)); //project1
ShowMessage(‘Ext = ‘+ExtractFileExt (Application.Exename)); //.exe
[/pascal]

關於「林壽山」

林壽山 軟體公司專案經理,第三方支付設計,金流設計,行動支付設計,支付寶,微信,街口支付,信用卡機,擅長PHP網頁設計(CodeIgniter、Laravel)框架、Delphi程式設計、資料庫設計、C# WinForm/WebForm程式設計
分類: Delphi,標籤: , , 。這篇內容的永久連結