Autor Beitrag
Andidreas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

Windows XP Pro
BDS 2006
BeitragVerfasst: Mi 21.03.07 14:04 
Kann mir bitte jemand erklären was ich für einen Fehler in meinem Programm eingebaut habe. Ich lese im User-Dir alles *.ini -Dateien ein und möchte anschließend alle desktop.ini löschen, klappt aber nicht, es bleiben immer 8 übrig. Ich komme einfach nicht dahinter wo der Fehler liegt.
Einloggen, um Attachments anzusehen!
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mi 21.03.07 14:33 
Hallo!

N "Hallo" wär nich nich verkehrt gewesen...

Unit diverses fehlt..

LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
Andidreas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

Windows XP Pro
BDS 2006
BeitragVerfasst: Mi 21.03.07 14:40 
Ja, hast recht, bin zur Zeit etwas durch den Wind. Denken klappt nicht so richtig.
So bitte hier diverses.pas.
Einloggen, um Attachments anzusehen!
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mi 21.03.07 14:52 
Hallo!

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
// Alle desktop.ini löschen
procedure TForm1.btnDeleteDesktopClick(Sender: TObject);
var i: integer;
begin
 i:= Listbox1.items.count-1;
 while i > -1 do
 begin
  //Prüfen ob Desktop-Dateien vorhanden sind
  if Pos('DESKTOP', uppercase(Listbox1.items.strings[i])) > 0 then
  begin
   //Datei löschen
   try
    deletefile(Listbox1.items.strings[i]);
    //Datei aus Listbox löschen
    Listbox1.items.delete(i);
    dec(i);
   except
    on e: exception do
    begin
     messagebox(application.handle, pchar('Fehler: ' + e.message), 'FEHLER', MB_IconERROR);
     exit;
    end;
   end;
  end;
  //Evtl. Prozedure zum Erneuten Einlesen aufrufen
 end;
end;


LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
Andidreas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

Windows XP Pro
BDS 2006
BeitragVerfasst: Mi 21.03.07 16:10 
Danke. Mit uppercase klappt es. Ich will aber nicht die Datei von Platte löschen, sondern nur aus der ListBox entfernen.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mi 21.03.07 16:14 
Dann kommentier/lösch die Zeile halt raus :)

LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
Andidreas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

Windows XP Pro
BDS 2006
BeitragVerfasst: Mi 21.03.07 16:17 
Nö, die nehm ich garnicht erst rein. :mrgreen: