Hi,
i have this batch file - myCustom.bat which has following code in it -
set dest_server=\\myRemoteSrv\Builds
set dest_build_loc=%dest_server%\%2%\
echo %dest_build_loc% >> buildLocLog.txt
echo Copying %1\myTest.zip %dest_build_loc% >> buildLocLog.txt
xcopy %1\myTest.zip %dest_build_loc% /D /F >> xcopyOutputLog.txt
when i call the above batch file from command line with - c:> myCustom.bat c:\Builds\123 123 then everything works fine - c:\Builds\123\myTest.zip is copied successfully to \myRemoteSrv\Builds\123\myTest.zip (the dest folder gets created if it is not there)
But the same batch file fails to copy the file when i am executing it as a separate process - when i do this spawn a new "cmd.exe" process by passing "/c myCustom.bat c:\Builds\123 123" as arguments to it -
note that - the batch file is receiving the correct inputs - when i check the buildLocLog.txt i see the following text in it -
\\myRemoteSrv\Builds\123
Copying c:\Builds\123\myTest.zip \\myRemoteSrv\Builds\123\
but the xcopy command fails- the xcopyOutputLog.txt contains following lines in it "0 File(s) copied"
could someone please let me know where i am going wrong ?
thanks,