procedure TForm1.Button2Click(Sender: TObject);
var
s: TStringList;
i: integer;
begin
s := TStringList.Create;
s.Add('aa');
s.Add('bb');
s.Add('cc');
if s.Find('cc', i) then
ShowMessage(IntToStr(i));
end;
nCount := theFileList.count;
if theFileList.Find(strFileName, nIndex) then
begin
theFileList.Delete(nIndex);
theFileList.add(strFileName);
end
else begin
...
end;