Python Forum
Copying files from a remote Windows station
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copying files from a remote Windows station
#11
I don't know how to do this with Python, but I use rsync to back up everything important on my computer to my older laptop.

A command like this is a bash shell does a great job! You need the user's password for the remote machine.

rsync -av -e "ssh" --progress /home/pedro/myPython [email protected]:/home/pedro/

You can use rsync the other way around, get files from a remote machine to your localhost. I haven't tried that, no need.

rsync uses ssh by default now I believe, so actually no need to specify ssh.

On Linux, you need to install openssh.

You need the ip of the remote machine. I don't know how you would get that from your local machine.

In Linux you can find your ip with ifconfig. There is probably a way to find all machines on your local network. Never tried that.

rsync only copies files which have been changed since last time you did this, or new files.

So, if you copy a CD, the next time, rsync won't copy it again, because it hasn't changed. That saves a lot of time!

rsync can accept batch files. Personally, I think rsync is great!

Here's a link for rsync.
Reply
#12
Great info! Thanks snippsat!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Triggering a ps1 script in remote windows server via http python request jasveerjassi 1 371 Jan-26-2024, 07:02 PM
Last Post: deanhystad
  Rename files in a folder named using windows explorer hitoxman 3 740 Aug-02-2023, 04:08 PM
Last Post: deanhystad
  Phyton Opening files on windows C: pc EddieG 3 991 Mar-29-2023, 03:19 PM
Last Post: buran
  Copying files if the name is in range tester_V 9 1,534 Nov-24-2022, 12:21 AM
Last Post: tester_V
  How to take the tar backup files form remote server to local server sivareddy 0 1,901 Jul-14-2021, 01:32 PM
Last Post: sivareddy
  Mathematical Conversion Scripts for Weather Station Mickey53usa 11 4,622 Jun-24-2020, 03:14 AM
Last Post: buran
  Copying a file Kundan 1 2,092 Aug-21-2019, 09:55 AM
Last Post: snippsat
  Help copying files with shutil hikerguy62 2 4,299 Aug-02-2019, 08:16 PM
Last Post: hikerguy62
  Code works in IDLE, appears to work in CMD, but won't produce files in CMD/Windows ChrisPy33 3 3,245 Jun-12-2019, 05:56 AM
Last Post: ChrisPy33
  help need with running python script on remote windows machine onenessboy 2 11,113 Dec-14-2018, 03:02 PM
Last Post: onenessboy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020