如题
Var
Sc :TSearchRec;
path : string;
T : Tstrings;
i: integer
begin
t:= Tstringlist.create;
path := Extractfilepath(Application.exename);
i :=Findfirst(path+*,sc)
while i=0 do
begin
if rightstr(Sc.name,4) = .exe then
t.add(path+sc.name)
i:=findnext(sc);
end;
findclose(sc);
end;