Archived Forum Post
$rc = $ftp->SendCommand($array[$i],$string);
Jun 09 '16 at 09:20
Why the 500 error?
DllDate: Dec 29 2015
Architecture: Little Endian; 32-bit
Language: Windows Perl
command: GET BAIEX530,CBFS3922 C:\ftp\banklink\baiexrpt
sendingCommand: GET BAIEX530,CBFS3922 C:\ftp\banklink\baiexrpt
replyLineQP: 500 Syntax error, command unrecognized.
- The SendCommand can only be used for commands where the result is just a reply on the command/control connection. It seems like you're trying to download a file, but that's not possible because FTP sends the file on a separate data connection.
- You're confusing the commands of an FTP console application vs. the commands of the FTP protocol. Let's say you start a DOS prompt and type the "ftp" command, and then begin entering commands at the FTP prompt, such as "ls", "cd", "get", etc. These are the human-interface commands to the FTP client application. The actual commands that get sent to the FTP server are the FTP protocol commands. These are specified in RFC 959 (https://tools.ietf.org/html/rfc959) as well as in many RFC's for FTP protocol extensions.
certainly makes sense. Thanks.