When using a command line with SMS (.cmd) it will default to using the current windows path.

Using this command will insert the current path which is hany when rolling out from multiple distribution points as it is updated depending on what server share its in.

For example you would use this line:

xcopy.exe "%~dp0*.*" c:\temp /E /I /Q /H /Y

The %~dp0 is replace with the current server path.