How to copy the files from a folder in one machine to the network shared location?

0

I have a Jenkins pipeline job in which i tried to copy the files from a directory in C:\ drive of my laptop to the network shared location to use the files by others. I have used the COPY, XCOPY, and ROBOCOPY. Am getting different errors for each one like Invalid drive specification, ERROR 1326 (0x0000052E) Accessing Destination Directory The username or password is incorrect. When i run the batch file from my laptop, it worked. When i triggered the Jenkins pipeline job and executing the batch file in it, i got the above-specified error.

Below is my Jenkins pipeline job code.

node
{
 bat 'xcopy /s/z "C:\\workspace\\test\\*.*" "\\\\192.18.10.60\\Temp\\vel"'
 bat 'XCOPY C:\\workspace\\test \\\\192.18.10.60\\Temp\\vel'
 bat 'robocopy "C:\\workspace\\test\\" "\\\\192.18.10.60\\Temp\\vel" /MIR'
 bat 'ROBOCOPY "C:\\workspace\\test" "\\\\192.18.10.60\\Temp\\vel"'
}

Could anyone please give your valuable suggestions to resolve this error?

batch-file
c#-4.0
jenkins-pipeline
xcopy
robocopy
asked on Stack Overflow Oct 10, 2017 by Karthi

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0