Einzelnen Beitrag anzeigen

Benutzerbild von St.Pauli
St.Pauli

Registriert seit: 26. Dez 2004
351 Beiträge
 
Delphi 7 Personal
 
#4

Re: Problem beim Vergleich verschiedener ListBox-Einträge

  Alt 20. Mär 2005, 11:07
nein, läuft nicht...
hier mal der ganze code....

Delphi-Quellcode:
 GetFilesInDirectory('C:\', '*.*', ListBox1.Items, True, False);
  GetFilesInDirectory('C:\', '*.*', ListBox3.Items, True, False);

  ProgressBar1.Min := 0;
  ProgressBar1.Max := ListBox1.Items.Count;

  for i := 0 to ListBox1.Items.Count -1 do
    begin
      ProgressBar1.Position := i;
      ListBox2.Items.Add(ExtractFileName(ListBox1.Items[i]));
    end;

  for i := 0 to ListBox3.Items.Count -1 do
    begin
      ProgressBar1.Position := i;
      ListBox4.Items.Add(ExtractFileName(ListBox3.Items[i]));
    end;

  ProgressBar1.Min := 0;
  ProgressBar1.Max := ListBox4.Items.Count;

  hilfs := ListBox4.ITems.Count;

  for i := ListBox4.Items.Count -1 downto 0 do
  ProgressBar1.Position := hilfs-i;
    begin
      for i2 := ListBox2.Items.Count - 1 downto 0 do
        begin
          s1 := ListBox4.Items[i];
          s2 := ListBox2.Items[i2];
          if (s1 = s2) then
            begin
              ListBox5.Items.Add(ListBox3.Items[i]);
              ListBox3.Items.Delete(i);
              ListBox4.ITems.Delete(i);
            end;
        end;
    end;
Dient zur suche doppelter dateien - ich weiss, im moment macht das ganze noch keinen sinn, wollte aber erstmal, das der code steht.
Gruß St.Pauli
  Mit Zitat antworten Zitat