From: Allan on
Realize this is a bit old, but I had this problem and I managed to find a way around it. I just preceded the command with CALL. Hope this helps someone else.

i.e
xcopy "%COMPUTERNAME%\folder\*.*" "destination"

CALL xcopy "%COMPUTERNAME%\folder\*.*" "destination"

From http://www.developmentnow.com/g/113_2004_11_0_0_436212/SQL-Agent-CmdExec-step-and-environment-variables.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/