ftp to IP address

nbrege

Freshman
Joined
Jan 12, 2006
Messages
34
I need to send a text file on the local machine to a unix server. I know the IP address, username & password to connect. I have tried using the following line of code:

Visual Basic:
My.Computer.Network.UploadFile("c:\test.txt", "10.2.2.10", "username", "password")

This gives me the following error:

'10.2.2.10' is not a valid remote file address. A valid address should include a protocol, a path and a file name.
Parameter name: address

Do I have to specify the destination path on the remote server? If so how do I specify that with an IP address? Maybe like this ... 10.2.2.10/foldername/subfoldername/etc... ?

I am able to ping the server & get a response. I am also able to send the file using the Dos ftp command. I just don't know the proper syntax in VBexpress. Thanks for any help...
 
The error message pretty much tells you what you need to do - you need to specify a protocol for the upload and a filename.

try something like
Visual Basic:
My.Computer.Network.UploadFile("c:test.txt", "ftp://10.2.2.10/test.txt", "username", "password")
 
Back
Top