下面的函数可以。
procedure GetAllFileFromDir(Dir: string; FileList: TStrings);
var
finished: Integer;
sr: TSearchRec;
begin
if fileList=nil then exit;
if FindFirst(dir+'/*.lnk',faAnyfile,sr)= 0 then
begin
Repeat
//if (sr.Name<>'.') and (sr.Name<>'..') then
FileList.Add(sr.Name);
until
FindNext(sr)<>0;
FindClose(sr);
end;
end;