вот так?
begin
AssignFile(f,'l1_in.txt');
Reset(f);
while not eof(f) do
begin
Read(f,a);
ListBox1.Items.Add(Inttostr(a));
end;
closefile(f);
for a:=0 to listbox1.Count-1 do
if Strtoint(ListBox1.Items.Strings[a])>=0 then
ReWrite (l1_max_out.txt);
write Inttostr(ListBox1.Items.strings[a]);
closefile(l1_max_out.txt); else
ReWrite ( l1_min_out.txt);
write Inttostr(ListBox1.Items.strings[a]);
closefile ( l1_min_out.txt) ;
end;