In Jenkins execute Windows batch command:
rmdir "\\other_pc\dir"
deleteServerDir.bat
deleteServerDir.bat
:
rmdir "\\other_pc\dir"
These two methods failed both, the console output is:
xxx\Jenkins|workspace\test>rmdir "\\other_pc\dir"
Access is Denied
However, both work when I type rmdir "\\other_pc\dir"
in cmd window or directly run file deleteServerDir.bat
.
It seems that Jenkins do not know the username and password which I used and stored in Windows to log into \\other_pc\dir
.