FtpSetCurrentDirectory(’’) fails

Discuss RoboTask here
Post Reply
lonnie16
Posts: 20
Joined: Thu Sep 09, 2004 9:40 am
Location: United States
Contact:

FtpSetCurrentDirectory(’’) fails

Post 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.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

FtpSetCurrentDirectory(’’) fails

Post 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.
lonnie16
Posts: 20
Joined: Thu Sep 09, 2004 9:40 am
Location: United States
Contact:

FtpSetCurrentDirectory(’’) fails

Post 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 ?
 
Post Reply