How to transfer files from one computer to another

2019-02-03 12:34发布

I need a simple application, preferably a cross-platform one, that enables sending of files between two computers.

It just need to accept and send the files, and show a progress bar. What applications could I use or how could I write one?

9条回答
对你真心纯属浪费
2楼-- · 2019-02-03 13:15

Can you install FTP servers on (one of) your machines ?

If you can, you will just have to use a FTP client (FileZilla for example, which have a progress bar).

查看更多
唯我独甜
3楼-- · 2019-02-03 13:15

Two popular apps are "scp" and "rsync". These are standard on Linux, are generally available on Unix and can be run on Windows under cygwin, although you may be able to find windows-native apps that can do it as well. (PuTTY can serve as an SCP client).

For any sort of pc-to-pc file transfer, you need to have a listener on the destination PC. This can be a daemon app (or Windows system process), or it can be a Unix-style "superserver" that's configured to load and run the actual file-copy app when someone contacts the listening port.

SCP and one of the rsync modes do require that there be some sort of remote login capability. Rsync can also publish resources that it will handle directory. Since the concept of a Windows "remote login" isn't as well-established as it is under Linux, this may be preferable. Plus it limits remote access to defined sources/targets on the destination machine instead of allowing access to any (authorized) part of the filesystem.

查看更多
ら.Afraid
4楼-- · 2019-02-03 13:17

Woof is a cool Python script that might work for you:

http://www.home.unix-ag.org/simon/woof.html

查看更多
仙女界的扛把子
5楼-- · 2019-02-03 13:24

Sun's Java 6 includes a light-weight HTTP server API and implementation. You could fairly easily use this to serve your file, using URLConnection to obtain it.

查看更多
Explosion°爆炸
6楼-- · 2019-02-03 13:25

Check out this tutorial, it's a really basic example. You would probably also want to send control headers prior to the actual file being sent, containing the size of the file, filename, etc.

Alternatively, base it on an existing protocol, like this project.

查看更多
聊天终结者
7楼-- · 2019-02-03 13:28

I would strongly consider using FTP. Apache has a FTP client and a server

Edit: spdenne's suggestion of HTTP is also good, especially if everyone has Java 6. If not, you can use something like Tiny Java Web Server.

查看更多
登录 后发表回答