LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

InetFTPGetDir does not return a valid value

Im attempting to write a function that will remember the current FTP directory and then set it back after its done some work.
So I delcare my variable char userDir[MAX_PATHNAME_LEN] = {0}; and then call InetFTPGetDir(ftpHandle, userDir, MAX_PATHNAME_LEN); The function returns 0 and fills userDir with "urrent directory is" regardless of what the directory really is. I have a feeling the problem is caused by the unusual FTP server that I'm using (VxWorks). I had a problem with the directory listing command and that was fixed for me in 8.0.1. I tried my program on ftp.ni.com and it worked fine. Is there any way I can get this to work with my FTP server? Thanks.
 
Vahid
vahid.ellig@hunttechnologies.com
0 Kudos
Message 1 of 2
(3,053 Views)

VxWorks uses a very non-standard FTP server, this caused me all sorts of problems at my last job when I had to access the server on our products. I basically had to manually keep track of exactly where I was in the file structure.

It was a pain but it is probably what you are going to have to do also. I am not familiar with the NI InetFTP* functions but I suspect they are geared towards a "standard" Unix-style FTP server with a certain output format. If it doesn't get the format it expects, it just grabs whatever is in the place it is trying to find the directory name.

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 2 of 2
(3,036 Views)