Hi
I want to copy a file from \\serverx.x.x.x\drive$\location\somefile.extension to my local computer.
xcopy /v /y \\10.21.21.121\f$\CMBuild\build_05_07_00_235_copy\DB\Upgrade.bat .
When I run this command in cmd prompt, it works fine and when I put this line in a .bat file and run the .bat file from cmd prompt it works fine.
When I call the above bat file from Jenkins, it gives me an error.
21:15:29 Invalid drive specification
21:15:29 0 File(s) copied
What the heck? Why DOS doesn't work when we need to.
NOTE: All other command which are in the same .bat file are working fine when I'm calling from Jenkins, commands like echo, del, mkdir, etc .
Now, when I replace XCOPY with copy, it works from cmd / running .bat from cmd prompt. but when running from Jenkins, its gives, provide your userid/password to access the file.
Logon failure: unknown user name or bad password.
Xcopy - file copy.
Moderator: DosItHelp
Re: Xcopy - file copy.
What is Jenkins?
If it is running in a shell there could be restrictions. Try this:
cmd /c "copyfiles.bat"
You may also strike permissions issues if Jenkins is running with system account privileges.
If it is running in a shell there could be restrictions. Try this:
cmd /c "copyfiles.bat"
You may also strike permissions issues if Jenkins is running with system account privileges.