1、ExtractFilePath(Application) 后面会带有 ""
ExtractFileDir(Application) 后面不带有 ""
2、
procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Lines.Add(ExtractFilePath(Application.ExeName)); Memo1.Lines.Add(ExtractFileDir(Application.ExeName)); end;
2.1、输出:
C:Users33DesktopDelphi_Test C:Users33DesktopDelphi_Test
3、
4、
5、