LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transfer file.txt in another pc con datasocket

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 

0 Kudos
Message 1 of 17
(3,148 Views)
You can transfer text using TCP/IP and then write to a file.
0 Kudos
Message 2 of 17
(3,141 Views)

How can I do??I have transfer a file .txt  Smiley Sad

Regards

0 Kudos
Message 3 of 17
(3,128 Views)

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.

Message 4 of 17
(3,125 Views)

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?

 

 

 

0 Kudos
Message 5 of 17
(3,117 Views)

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.

 

Message 6 of 17
(3,112 Views)
fantastic! But if I don't have access to the client? Io want to transfer file after a remote connection
0 Kudos
Message 7 of 17
(3,110 Views)
What do you mean by

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).

 

0 Kudos
Message 8 of 17
(3,101 Views)

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.Smiley Sad

 

I do not know if I have explainedSmiley Sad

0 Kudos
Message 9 of 17
(3,098 Views)

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.

 

0 Kudos
Message 10 of 17
(3,096 Views)