ShFileOperation()<br>复制目录:<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>//Copy 多个文件的处理:<br>function CopyFiles(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 := @source[1];<br> pTo :=pchar(dest);<br> fFlags := FOF_NOCONFIRMATION+FOF_NOCONFIRMMKDIR ;<br> end;<br> Result := (SHFileOperation(fo) = 0);<br>end;<br>...........<br>Rename.....类似。自己看吧。