Put the command into a batch file:
 Code:
$CMD='XCOPY "'+$fm+'" "'+$to+'" /c/e/q/g/h/r/k/o/v/y'
$File = '%TEMP%\myxcpy.bat'
Del $File
RedirectOutput($File)
'@Echo Off' ?
$Cmd ?
'Exit %ERRORLEVEL%' ?
RedirectOutput('')
Shell $File
'Returned ' @ERROR

See if that gives you anything better to see what's happening.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D