Run a batch file that copies files from local drive to a network drive

I am trying to run a batch file to copy a few files from a local drive to a network folder on another OS. I used: system.util.execute(['C:/Users/user/Documents/Copy.bat'])
The problem is when I use above code in any perspective or Gateway script, nothing happens. No file gets copied over and even there is no logs in the wrapper.
I can run the code in Script Console and it works just fine.
The funny part is when I change the batch file to copy files from a local folder to another local folder, the script works just fine.
Does anyone has any idea how I can fix it?

The gateway runs as a service and, by default, has no access to network file shares. What you can do in the designer means nothing.

Some reading for you:

https://forum.inductiveautomation.com/search?q=map%20shared%20drive%20order%3Alatest

Thanks for replying. But I am running just a batch file outside of the Gateway. Do you think that the Python or Java script read the content of the batch file and just block
it?

No, if you are running the batch file from a jython script in the gateway (or Perspective), then the batch file will run with the same OS credentials that the gateway is using. And the default LOCAL SYSTEM account cannot work directly with network shares.

Read at least of few of the topics linked to see the whole picture.

Thank you.

I am wondering what should I put in the .config file for a path like this:
\\192.168.1.1\c$
Ignition is running on a VM and above is the address of the server that the VM is running on.
wrapper.share.1.location=?
wrapper.share.1.target=?
wrapper.share.1.type=DISK?