I’m running an xcopy command in a batch script which copies a file to a shared drive on another workstation; however the workstation requires a login before connecting to the share. Is there a way to script the login/connect into the batch file?
thanks in advance
You can use the ‘net use x:\servername\sharename /u:username password’ command to login to the share within the batch file. However putting the password into a plaintext batch file is generally a bad idea.