Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The system cannot find the specified drive in Jenkins

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. This batch file runs successfully on cmd, but i am having issue when i trigger it through Jenkins. The Jenkins gives the following error:

"The system cannot find the specified drive"

Any help regarding this, will be greatly appreciated.

Thanks, Nouman.

like image 838
Nomi Khan Avatar asked Nov 29 '12 07:11

Nomi Khan


People also ask

How do I access a network drive in Jenkins?

Basically you can access your network shared drive (Z) using by servername or IP from jenkins command. Write \\192.168. x. xxx\Your_Folder instead of z:\Your_Folder .


1 Answers

Yes Jenkins uses different login credentials. To map a drives through Jenkins use below command in Jenkins command prompt:

Subst U: \drive\folder

then after that your queries.

like image 136
Pranjay Kaparuwan Avatar answered Oct 13 '22 19:10

Pranjay Kaparuwan