10-05-2009 04:26 PM
Can I transfer a file.txt in another pc with datasocket?
I want to have a file on my pc and on another connected pc on the web. How can I do??
Regards
Angelo
10-05-2009 06:10 PM
10-06-2009 02:27 AM
How can I do??I have transfer a file .txt
Regards
10-06-2009 03:09 AM
Research the TCP/IP VIs under Communications. With TCP/IP you are able to send the text as a string. On the receiving end you can write to a text file.
Look at the LabVIEW Examples under Help. Search for TCP/IP.
10-06-2009 03:36 AM
Is this a method?
http://zone.ni.com/devzone/cda/epd/p/id/2842
But are server VI and client VI running on the same machine?
10-06-2009 03:47 AM
Yes, this example shows how to transfer files. The 2 VIs can run on different machines. In the client VI you can specify the server address and port to use. Port must be the same as set in the server.
Tricky thing might be to avoid problems with firewalls. The server must accept incoming connections on the specified port.
10-06-2009 03:53 AM
10-06-2009 03:59 AM
therealdeal wrote:
I don't have access to the client
? How do you plan to transfer files to a machine you don't have access to?
You can rewrite the example so that the client becomes the server. The server will wait for incoming connections and save the file (without save dialog). The client will open a connection when it wants to send a file and send it.
But for this purpose you might want to use FTP which does exactly that. If you have the Internet toolkit there's an FTP palette. You will have to run a FTP server on the target machine. There's free FTP Server software available (for instance FileZilla Server).
10-06-2009 04:18 AM
I don't have the toolkit.This is my problem. I have a pc and I make some measures in remote connection and I disconnect. Another pc(the client) in the university, it makes some measures and it is disconnected. I want to transfer my text files from my pc to the client.
All this happens in remote connection.
I do not know if I have explained
10-06-2009 04:29 AM
As mentioned in my last post, you can modify the file transfer example as follows:
- University PC: listener, waiting for incoming connections. When a connection is opened the server reads the data and saves it to a file.
- Your PC: whenever you have a file ready to send, open a connection to the server and send the file.
But again, I'm not sure it will work this way due to firewall restrictions. Does the University PC have a fixed public IP address? Are you able to accept incoming connections or are they blocked? (Actually I would hope they are blocked since this is a risk for the university network).
If you can't run a server on the university network you can still try the other way round: run a server on your PC. The university PC will open a connection from time to time to ask your PC for new files. Your PC can send data through that connection.