Autor Beitrag
souso20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Mo 04.10.04 09:33 
Hallo Leute,

gibt es eine Möglichkeit in Delphi einen Ordner mit all seinen Unterordnern und Dateien zu löschen?

Ich denke das ganze geht rekursiv. Für einen Lösungsansatz wäre ich sehr Dankbar.

muchas gracias

Moderiert von user profile iconTino: Beiträge aus diesem Topic gelöscht
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 04.10.04 09:58 
Rekursiv ist schonmal gut.
Die Funktionen die du benötigst sind: FindFirst, FindNext und DeleteFile.
souso20 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Mo 04.10.04 10:13 
hat vielleicht einer nen bischen Quellcode parat.

Weis nicht so recht wie ich das machen soll!
Pille
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 105

Windows 7
DelphiXE Prof.
BeitragVerfasst: Mo 04.10.04 11:38 
Nimm von Jedi die Komponente TJvSHFileOperation.

mfg Pille
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mo 04.10.04 11:44 
Wenn es nur um das Löschen an sich geht, kannst du auch ShellExecute in Verbindung mit dem Del-Befehl verwenden.
Dann wird das ganze zum Einzeiler.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 04.10.04 12:04 
Hallo!

Benutze doch diese FAQ Beitrag um alle Dateien in einem Verzeichnis (+ Unterverzeichnissen) zu finden. Anschl. löscht du diese mit der DeleteFile Funktion.

Gruß
Tino