Translate

2011/06/14

Delphi中擷取路徑名稱及檔案名稱的作法

範例:c:\aa\bb\cc\abc.exe
語法:

Label1.Caption := ExtractFileDir(Edit1.Text);
Label2.Caption := ExtractFilePath(Edit1.Text);
Label3.Caption := ExtractFileName(Edit1.Text);


結果:

c:\aa\bb\cc
c:\aa\bb\cc\
abc.exe




趕快來實作看看吧!

沒有留言:

張貼留言

Delphi in Web Development: WebBroker + EasyUI (01)

I have been received many demand about web development for long time. But, I don't wont to use ASP.NET develop the web project. M...