Parece que o cliente de ftp do MS não suporta o modo passivo. Verifique este .
Depois de configurar corretamente o FileZilla para se comunicar entre os servidores, eu tentei automatizar algumas transferências usando o suporte FTP embutido no Windows
ftp -s:command.file
Eu repliquei os comandos do cliente do FileZilla literalmente (usando literal ) e recebo esse fenômeno estranho:
Transferência bem-sucedida usando o FileZilla
(000058) 2009-05-19 18:30:51 - (not logged in) (*.*.*.*)> Connected, sending welcome message...
(000058) 2009-05-19 18:30:51 - (not logged in) (*.*.*.*)> 220 welcome...
(000058) 2009-05-19 18:30:51 - (not logged in) (*.*.*.*)> USER user1
(000058) 2009-05-19 18:30:51 - (not logged in) (*.*.*.*)> 331 Password required for user1
(000058) 2009-05-19 18:30:51 - (not logged in) (*.*.*.*)> PASS ******
(000058) 2009-05-19 18:30:51 - user1 (*.*.*.*)> 230 Logged on
(000058) 2009-05-19 18:30:51 - user1 (*.*.*.*)> CWD /
(000058) 2009-05-19 18:30:51 - user1 (*.*.*.*)> 250 CWD successful. "/" is current directory.
(000058) 2009-05-19 18:30:51 - user1 (*.*.*.*)> PWD
(000058) 2009-05-19 18:30:51 - user1 (*.*.*.*)> 257 "/" is current directory.
(000058) 2009-05-19 18:30:53 - user1 (*.*.*.*)> TYPE I
(000058) 2009-05-19 18:30:53 - user1 (*.*.*.*)> 200 Type set to I
(000058) 2009-05-19 18:30:54 - user1 (*.*.*.*)> PASV
(000058) 2009-05-19 18:30:54 - user1 (*.*.*.*)> 227 Entering Passive Mode (*.*.*.*.*.206)
(000058) 2009-05-19 18:30:54 - user1 (*.*.*.*)> STOR testfile.bmp
(000058) 2009-05-19 18:30:54 - user1 (*.*.*.*)> 150 Connection accepted
(000058) 2009-05-19 18:30:54 - user1 (*.*.*.*)> 226 Transfer OK
(000058) 2009-05-19 18:30:54 - user1 (*.*.*.*)> PASV
(000058) 2009-05-19 18:30:54 - user1 (*.*.*.*)> 227 Entering Passive Mode (*.*.*.*.*.207)
(000058) 2009-05-19 18:30:54 - user1 (*.*.*.*)> MLSD
(000058) 2009-05-19 18:30:55 - user1 (*.*.*.*)> 150 Connection accepted
(000058) 2009-05-19 18:30:55 - user1 (*.*.*.*)> 226 Transfer OK
(000057) 2009-05-19 18:31:12 - user1 (*.*.*.*)> disconnected.
Esta é minha tentativa, usando o FTP
(000060) 2009-05-19 18:34:17 - (not logged in) (*.*.*.*)> Connected, sending welcome message...
(000060) 2009-05-19 18:34:17 - (not logged in) (*.*.*.*)> 220 welcome...
(000060) 2009-05-19 18:34:22 - (not logged in) (*.*.*.*)> USER user1
(000060) 2009-05-19 18:34:22 - (not logged in) (*.*.*.*)> 331 Password required for user1
(000060) 2009-05-19 18:34:24 - (not logged in) (*.*.*.*)> PASS ******
(000060) 2009-05-19 18:34:24 - user1 (*.*.*.*)> 230 Logged on
(000060) 2009-05-19 18:34:33 - user1 (*.*.*.*)> CWD /
(000060) 2009-05-19 18:34:33 - user1 (*.*.*.*)> 250 CWD successful. "/" is current directory.
(000060) 2009-05-19 18:34:43 - user1 (*.*.*.*)> PWD
(000060) 2009-05-19 18:34:43 - user1 (*.*.*.*)> 257 "/" is current directory.
(000060) 2009-05-19 18:34:56 - user1 (*.*.*.*)> TYPE I
(000060) 2009-05-19 18:34:56 - user1 (*.*.*.*)> 200 Type set to I
(000060) 2009-05-19 18:35:03 - user1 (*.*.*.*)> PASV
(000060) 2009-05-19 18:35:03 - user1 (*.*.*.*)> 227 Entering Passive Mode (*.*.*.*.*.209)
(000060) 2009-05-19 18:35:19 - user1 (*.*.*.*)> STOR testfile.bmp
(000060) 2009-05-19 18:35:20 - user1 (*.*.*.*)> 425 Can't open data connection.
(000060) 2009-05-19 18:35:51 - user1 (*.*.*.*)> QUIT
(000060) 2009-05-19 18:35:51 - user1 (*.*.*.*)> 221 Goodbye
(000060) 2009-05-19 18:35:51 - user1 (*.*.*.*)> disconnected.
O que devo fazer para replicar o FZ? O que difere os dois clientes FTP?
Parece que o cliente de ftp do MS não suporta o modo passivo. Verifique este .
O MS FTP não funciona - eu faço as transferências agora usando este utilitário na linha de comando.
ncftpput -P 12345 -u user1 -p pass1 -F *.*.*.* / testfile.bmp