I have a requirement of automating the file copy from one shared drive location to another shared drive. I have instructed to use Groovy for the same.
I'm completely new to Groovy. I managed to copy the file using targetlocation << sourcelocation.text. But it requires a username and password to access the shared drive. I'm not sure how to do that.
Any help would be appreciated.
If it is a Windows or Samba share, you could use jcifs to connect:
You can then copy the file that you want.