How to get connected to Shared Drive?

As per the task, i need to copy some folders in shared drive to another folder, how to connect to shared drive?

You can use net.exe with start process to connect fileshare to drive letters.
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/gg651155(v=ws.11)