Page 1 of 1

FtpSetCurrentDirectory(’’) fails

Posted: Thu Nov 16, 2006 1:34 pm
by lonnie16
I am broke while using your example: FTP File Loop and download.  I started to use the new synchonize and got the same error.
The error is: FtpSetCurrentDirectory('') fails with message: The parameter is incorrect.
It is on the: "Executing "FTP File Loop" step, which has no such parameter to it.  The RoboTask doc has no mention.  I googled it and came up with...
FtpSetCurrentDirectoryBOOL FtpSetCurrentDirectory(

IN HINTERNET hFtpSession,

IN LPCTSTR lpszDirectory

);


Changes to a different working directory on the FTP server.

Returns TRUE if successful, or FALSE otherwise. To get the specific error code, call GetLastError. If the error code indicates that the FTP server denied the request to change a directory, use InternetGetLastResponseInfo to determine why.

hFtpSession
Valid handle to an FTP session.
lpszDirectory
Address of a null-terminated string that contains the name of the directory to change to on the remote system. This can be either a fully qualified path name or a name relative to the current directory.

FtpSetCurrentDirectory(’’) fails

Posted: Wed Nov 22, 2006 1:50 am
by Oleg
Hmm... we shall investigate the problem. Try to change the file mask in "FTP File loop" from "*.*" to "./*.*"
It must solve the problem.

"./*.*" means the same that "*.*" - all files from current folder.

FtpSetCurrentDirectory(’’) fails

Posted: Wed Nov 22, 2006 1:13 pm
by lonnie16
Thank you.  I tried that change and it made no difference.
I got to look at the ftp server side of the transfer try and see:
Connected to 192.168.2.1 on port 3964
250 Requested file action okay, completed
Type A
200 Command okay.
Port 192.168.2.15,126
200 IP:192.168.2.1 Port 3966 Noted. Command okay
LIST
150 File status okay, about to open data connection
425 No connection could be made because the target machine actively refused it. [REF:EDF422BED73F]
\/\/\/\/\/\/\/\/\/\/\/\/
Is this because of port mode versus passive mode ? How does the client and the server agree on that ?