(Moderator)
Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.867 Beiträge
Delphi 11 Alexandria
|
Re: Hilfe Verzeichnis anlegen +1 ?
7. Nov 2008, 20:53
Kleine Korrektur:
Delphi-Quellcode:
function DirectoryCreate( Path: string): boolean;
var
p, w, e: Integer;
s: string;
begin
w := 0;
if not DirectoryExists( Path) then
begin
MkDir(Path);
result := True;
end
else
begin
p := Pos( '-', Path);
if p > 0 then
begin
s := Copy( Path, p+1, Length( Path) - p);
w := StrToIntDef(s , 0)+1;
Path := Copy(Path, 1, p-1);
end;
Result := DirectoryCreate( Path +'-'+IntToStr(w));
end;
end;
Aufruf
DirectoryCreate( DateToStr( date));
Markus Kinzler
|
|
Zitat
|