LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[W] FTP using DataSocket or other

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?

Thanks,

Neal Pederson, President, VI Control Systems
1923 Mendius Lane, Los Alamos, NM 87544
TEL: (505) 662-1461, FAX: (603) 388
-4969
np@vicsys.com, www.vicsys.com
0 Kudos
Message 1 of 3
(3,893 Views)
"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
0 Kudos
Message 2 of 3
(3,893 Views)
I am having the same probem. I was able to access the site a week ago, but have done some spyware removal and am afraid that the fpt things in Windows XP may be messed up. How can I check? The DOS window fpt utility works fine. My FPT utility (WS_FPTpro) that runs in windows works fine.

And what do yuo mean by a relative address? I'm trying to talk to a Siemens S7-200 with their IT module. It's address is fpt://name:password@195.143.3.85/flash:/processdata/processdata_01.txt(text).
0 Kudos
Message 3 of 3
(3,893 Views)