View Full Version : how to read a file from another computer?

27th June 2012, 16:35
How to read a binary file on the other computer?
Thank you.

27th June 2012, 16:40
What do you mean?
What are the use case parameters?
Or do you expect us to read you mind via telepathy?
Show some interest in your own problem solving if you would like others to try and help you!

27th June 2012, 17:52

There is a binary file on one computer,How to read it from my computer with QT?

27th June 2012, 18:07
Your second answer did not add any information to what you already have written.
It is my guess you are you self clueless as to what actually you want to do.
So first - make sure YOU know what it is you want to do before you ask US how to do it.

27th June 2012, 19:17

There is a binary file on one computer,How to read it from my computer with QT?

There is a house in China. How to find it?

27th June 2012, 19:52
How to read it from my computer with QT?
You could take a flash drive, walk to the other computer, plug in the drive, copy the file to it, then take the drive out, go back to your machine, plug the drive, copy the file to the hard drive and then use QFile to access it. Or you could use one of the countless available protocols for network file transfer.

28th June 2012, 01:51
I am sorry for my bad english.
There is a binary file on one computer,I want to get it from my computer through Local Area Network,I think QFtp or QHttp may be used,but I do not know how to do?

28th June 2012, 06:26
If you can access the file through a network share or mounted driver outside of Qt then you probably just use QFile directly

If the file exists on a machine that has a running FTP (http://en.wikipedia.org/wiki/Ftp) server or HTTP (http://en.wikipedia.org/wiki/Http) server, and the file is accessible to that FTP or HTTP server, then you could use QFtp or QNetworkAccessManager (not QHttp) to access that server and retrieve the file.
FTP (Chinese) (http://zh.wikipedia.org/wiki/Ftp)
HTTP (Chinese) (http://zh.wikipedia.org/wiki/Http)

If you can install and run a program of your own on the machine with the file then you can use QTcpSocket to create a server and client pair to transfer the file.

Try to work out which option applies.