Registriert seit: 25. Apr 2003
Ort: Graz
2.234 Beiträge
Delphi 2006 Architect
|
Re: Ordner kopieren
13. Nov 2004, 23:27
Delphi-Quellcode:
var
OpStruc: TSHFileOpStruct;
frombuf, tobuf: Array [0..128] of Char;
Begin
fillChar( OpStruc, Sizeof(OpStruc), 0 );
FillChar( frombuf, Sizeof(frombuf), 0 );
FillChar( tobuf, Sizeof(tobuf), 0 );
StrPCopy( frombuf, ' d:\brief\*.*' );
StrPCopy( tobuf, ' d:\temp\brief' );
With OpStruc DO Begin
Wnd:= Handle;
wFunc:= FO_COPY;
pFrom:= @frombuf;
pTo:=@tobuf;
fFlags:= FOF_NOCONFIRMATION or FOF_RENAMEONCOLLISION;
fAnyOperationsAborted:= False;
hNameMappings:= Nil;
lpszProgressTitle:= Nil;
end;
ShFileOperation( OpStruc );
end;
Nico Müller
|
|
Zitat
|