"TNT News" wrote in message
news:38c59363@newsgroups.ni.com...
> I have an application where I would like to read and write to files via a
> password protected FTP site. I've had success reading and writing files
to
> un-password protected FTP sites using DataSocket but I get errors when I
try
> to access password protected sites. I use the following format as my URL:
> ftp://name:password@ftp.host.com/textfile.txt[text] and I get error
> code -2146697210. I have two questions:
>
> 1) Does anyone know what I might be doing wrong?
>
> 2) I would also like to be able to append to files via FTP. Does anyone
> know how to do this with DataSocket or any other way in LabVIEW?
Neal -
The error you're seeing is defined by the Windows INET library a
s
INET_E_OBJECT_NOT_FOUND, which is basically a "Path Not Found". The likely
reason you're seeing it is that the path name you're giving is relative to
the the login point. You need to be passing the absolute pathname instead
(this is what Microsoft's implementation of its INET library expects). This
is a little unintuitive, since Internet Explorer takes the relative path
name. Netscape, on the other hand, expects the absolute pathname, which
just goes to show that even in URLs, there is no standard (sigh).
As for the second point, DataSocket does not currently have an Append
connection mode, but this would be a useful feature! You could always read
in the file first, append data, and then write it back out.
Hope this helps!
--
Evan Cone
National Instruments