使用一个API函数搞定:<br>function CopyDirectory(const Source, Dest: string): boolean;<br>var<br> fo: TSHFILEOPSTRUCT;<br>begin<br> FillChar(fo, SizeOf(fo), 0);<br> with fo do<br> begin<br> Wnd := 0;<br> wFunc := FO_COPY;<br> pFrom := PChar(source+#0);<br> pTo := PChar(Dest+#0);<br> fFlags := FOF_NOCONFIRMATION+FOF_NOCONFIRMMKDIR ;<br> end;<br> Result := (SHFileOperation(fo) = 0);<br>end;<br>