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?
User contributions licensed under CC BY-SA 3.0