uses shellpai;
var
Source,Dest:String;
FData : TShFileOpStruct;
begin
Source:='c:/sss';//sss为目录
dest:='//computername/kkk';
//首先建立文件目录
if not DirectoryExists(Dest) then
begin
if not CreateDir(Dest) then
begin
MessageDlg('建立目录出现错误!',mtWarning,[mbOK],0);
Exit;
end;
Fdata.pFrom :=PChar(Source);
Fdata.pTo := PChar(Dest);
Fdata.wFunc := FO_COPY ;
Fdata.Wnd := Application.Handle ;
Fdata.lpszProgressTitle := 'Wait';
Fdata.fFlags :=FOF_SIMPLEPROGRESS;
ShFileOperation(FData);
end;
end;
end;