var
i:integer;
IsExists :boolean;
begin
IsExists := False;
for i:=0 to listbox1.Items.Count-1 do
if Fileexists(Trim(listbox1.Items[i])) then
IsExists := True
else begin
IsExists := False;
Break;
end;
if IsExists then
showmessage('1')
else
showmessage('2');
end;