function CopyFileDir(sDirName: String;

sToDirName: String): Boolean;

var

fo: TSHFILEOPSTRUCT;

begin

FillChar(fo, SizeOf(fo), 0);

with fo do

begin

Wnd := 0;

wFunc := FO_COPY;

pFrom := PChar(sDirName + #0);

pTo := PChar(sToDirName + #0);

fFlags := FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR;

end;

Result := (SHFileOperation(fo) = 0);

end;

调用windows的复制文件对话框-LMLPHP

05-27 07:51