在正确配置 FileZilla 以在服务器之间进行通信后,我尝试使用 Windows 内置 FTP 支持自动执行一些传输
ftp -s:command.file
我逐字复制了 FileZilla 的客户端命令(使用literal),我得到了这个奇怪的现象:
使用 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.
这是我的尝试,使用 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.
我应该怎么做才能复制 FZ?两个 FTP 客户端有何不同?
MS ftp 客户端似乎不支持被动模式。看看这个。
MS FTP 不起作用 - 我现在使用命令行中的此实用程序进行传输。