function TForm1.CopyPath(BasePath,TargetPath:string):Boolean; var i:Integer; cmd:string; begin cmd:='echo d | Xcopy '+BasePath+' '+TargetPath+' /s/e'; ShowMessage(cmd); i:=ShellExecute(Handle,nil,'cmd.exe',PChar('/K '+cmd),nil,SW_HIDE); if i>32 then Result:=True else Result:=False; end;