-1

I'm trying to perform automation for transferring the file from Ubuntu(Linux) to Window system using python. I'm stuck with how I can implement this. Can anyone please suggest me a way to implement this. My input for this will username, password, and windows path for the script.

Aaditya R Krishnan
  • 495
  • 1
  • 10
  • 31

1 Answers1

1

You don't explain what transfer files mean, and if you want to transfer on the same computer (having a Windows file system and a Linux one on two different disk partitions) or on two different ones. You should think in terms of network communication protocols and file systems.

For remote file transfer, think in terms of network communication protocols : you might consider using rcp or scp or HTTPS or HTTP or rsync or to transfer the files (see this and that). Take into account cybersecurity considerations, so consider Python cryptographic services. You could also consider network file systems such as NFS or CIFS (a.k.a. SMB) or sshfs. HTTP and HTTPS and SSH protocols (both client and server side, look also into libssh) which is widely supported by Python or Guile bindings.

For local computer transfer between different disk partitions, think in terms of file systems, you could consider mounting the other's OS partition. Be then aware of VFAT or NTFS and CIFS support in Linux, and Ext2fs and NFS support on Windows.

You can code in Python (with pycurl and/or other Internet protocols) or Guile quite easily web services. Be aware of SOAP and REST (and SMTP to send emails). You could be interested by WebSockets to code a nice web interface. You may be interested by Python or Guile bindings to SMTP client libraries, HTTPS or libssh server or client libraries.

Consider also using distributed version control systems such as git - with a remote repository. Of course you'll find pygit2, a Python binding to it, and of course git is running both server side and client side on both Windows and Linux.

Be also aware of legal licensing considerations mentioned here.

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547