I have network mapped drive called Z:
and want to copy a file using batch script which will be called from locally installed jenkins
. When I call that batch file manually, it copies the files successfully but it fails when the batch file is called from jenkins
.
The batch command is:
robocopy C:ProgramDataJenkins.jenkinsworkspaceTestProjectgen Z:Test config.txt
The output when called from Jenkins
C:ProgramDataJenkins.jenkinsworkspaceTestProject>robocopy C:ProgramDataJenkins.jenkinsworkspaceTestProjectgen Z:Test config.txt
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Saturday, May 25, 2024 9:52:54 AM
2024/05/25 09:52:54 ERROR 3 (0x00000003) Getting File System Type of Destination Z:Test
The system cannot find the path specified.
Source : C:ProgramDataJenkins.jenkinsworkspaceTestProjectgen
Dest = Z:Test
Files : config.txt
Options : /DCOPY:DA /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
2024/05/25 09:52:54 ERROR 3 (0x00000003) Creating Destination Directory Z:Test
The system cannot find the path specified.