I want to copy some files from a network shared drive (mounted at my local machine as drive Z). I have written a Batch file to copy the contents of Z drive into my local drive.
Try adding debugging commands to that bat file, or as separate build step, such as net use
, set
(pay attention to vars like like HOMEPATH
and USERNAME
) and plain dir Z:\
.
As said in another answer, most likely reason is that Jenkins runs as SYSTEM
user, which has different permissions. One way around that is, go to services (for example open Task Manager, go to Services tab in it, click the Services button at the lower right corner of that tab), find Jenkins service, open it's properties, go to "Log on" tab and set your normal user account as one that runs Jenkins.