Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCOPY to remote server

In order to improve the deployment / build process of my ASP.NET app, I would like to make a .bat that

  • builds the current solution in release mode
  • xcopy the files to a remote server

Creating a release build via command line is easy.

But how can I xcopy the files to the remote server?

I think I have to map the remote destination to a network drive (?). However I could not connect to the remote server, although I have enabled file sharing for the folder on the server. Maybe the firewall is blocking the request? Which port should I open? Or is there another solution?

EDIT

Thanks for all the answers so far, but I probably need a step by step guide on how to set up the folder sharing on the server. I shared the folder, I opened up port 445 so that I can connect to the server but still, I cant connect from my local machine to the server in order to map the network path to a system drive.

like image 815
Max Avatar asked Jul 27 '26 16:07

Max


1 Answers

It might be worth moving the files with XCOPY via a UNC path

\\machine\folder

That will require you to have access to folder from the originating server. Check that the folder has been shared and that the relevant read/write permissions have been granted.

like image 196
AutomatedTester Avatar answered Jul 30 '26 07:07

AutomatedTester



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!