Files copying to different machine not happening from batch file executed from SQL Jobs I am trying to execute a batch file from SQL Server 2012 JObs with the following command 

cmd.exe /c "D:\Batch Files\SQLDBBkupCopy.bat".


The objective of the batch file is to copy SQL DB backup to a different machine in the network. The Job successfully ran, but there was no files copied. 

From the Jobs history I could able to see this error message:


  Executed as user: SLC\sqlagentservice. Invalid drive specification  0
  File(s) copied.  Process Exit Code 0.  The step succeeded.


Here is my Batch file script:

***********Start******
@echo off
cls
echo.------------------------&gt;&gt;CopyLog.txt
echo.%Date% %Time%:- INITIATING FOLDERS......&gt;&gt;CopyLog.txt
set folder1="B:\SLCBackup\ForSymantec"
set folder2="\\testsvr\c$\SQLBKUP\SLCDBAREN"
echo.%Date% %Time%:- Initiation Complete.....&gt;&gt;CopyLog.txt
echo.%Date% %Time%:- Copying from %folder1% to %folder2% &gt;&gt;CopyLog.txt
xcopy /E /C /R /I /K /Y %folder1% %folder2%
echo.%Date% %Time%:- Complete...&gt;&gt;CopyLog.txt
*****End*********


However, if I try to copy in the same machine like: 

set folder2="c:\test1" 


it then works.
For any interaction with the Operation System, insure that the user services of SQL Server has the privileges