Autor Beitrag
F.Art
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: So 08.02.04 17:04 
Ich würde gerne ein leere Verzeichnis löschen, nur wie?
ixtreme
Gast
Erhaltene Danke: 1



BeitragVerfasst: So 08.02.04 17:06 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
function DelDir(dir: string): Boolean;
var
  fos: TSHFileOpStruct;
begin
  ZeroMemory(@fos, SizeOf(fos));
  with fos do
  begin
    wFunc  := FO_DELETE;
    fFlags := FOF_SILENT or FOF_NOCONFIRMATION;
    pFrom  := PChar(dir + #0);
  end;
  Result := (0 = ShFileOperation(fos));
end;


gruß

ixtreme.de
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 08.02.04 17:19 
daszu musst du noch die ShellAPI in die uses klause mit übernehmen !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: So 08.02.04 18:21 
Danke es klappt super
Brueggendiek
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 304

Win 98, Win98SE, Win XP Home
D5 Std
BeitragVerfasst: So 08.02.04 20:52 
Hallo!

Warum denn so kompliziert?

Delphi bietet doch die Funktion "RemoveDir" an (Unit SysUtils).

Gruß

Dietmar Brüggendiek