Windows: Copy files in remoted machine from that machine to local machine

0

I am on a Windows computer, say "LocalA". I manually RDP into a remote server, say "RemoteB". From RemoteB I run a script which does a bunch of things and at the end it should copy/send files from RemoteB to the machine from which I remoted, i.e. LocalA. How can the copy part be achieved using powershell or similar program?

Basically, I want to do something like this in powershell (or using any external command line tool):

# pseudo syntax
Copy -source RemoteB/C:/foo.txt -target LocalA/C:/foo.txt
# run from RemoteB

However, LocalA and RemoteB are not on any shared network or domain. They are totally unrelated machines. All I have with me is IP of RemoteB, the username and password.

I can of course manually pull a file from RemoteB to LocalA, using Ctrl+C, Ctrl+V. Basically I am trying to automate the manual copying.

nawfal

Posted 2018-10-18T07:40:30.923

Reputation: 113

Answers

1

Option A : mount each others drive as its network drive and then copy/paste file as usual.

Option B (my favorite) : install an ftp server (I use ftpserverlite, and setup say.. D:\ drive + 1 account(UsrName&pswd) with all access + start server) > and the receiving side.. access it via command prompt using ftp 10.5.4.8 (Assuming that is the receiving side IP) > enter UsrName > Enter pswd > use get and put command to either get files from server or put a local file into server. || use quit to exit ftp command & ls to list files.

p._phidot_

Posted 2018-10-18T07:40:30.923

Reputation: 948