Code:
SHELL '"'+%COMSPEC%+'" /C xcopy "C:\Documents and Settings\vnm.000\My Documents\*" "y:\*" /d /e /y /k /q /c /v /f >> C:\xcopylog.txt'
If @ERROR "XCOPY Failed with error ["+@ERROR+"] "+@SERROR+@CRLF Exit @ERROR EndIf