function ExtractFileName(const FileName: string): string; 
如"mytest.doc"
var
  I: Integer;
begin
  I := LastDelimiter(PathDelim + DriveDelim, FileName);
  Result := Copy(FileName, I + 1, MaxInt);
LastDelimiter(PathDelim + DriveDelim, FileName);
什么意思啊,一个都不懂哦,去网上查了大半天没有结果要命哦。