使用 Windows ftp 命令复制 FileZilla

使用 Windows ftp 命令复制 FileZilla

在正确配置 FileZilla 以在服务器之间进行通信后,我尝试使用 Windows 内置的 FTP 支持自动执行一些传输

ftp -s:command.file

我逐字复制了 FileZilla 的客户端命令(使用文字),我发现了这个奇怪的现象:

使用 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 客户端有什么不同?

答案1

看来 MS FTP 客户端不支持被动模式。检查出去。

答案2

MS FTP 无法使用 - 我现在使用此实用程序从命令行。

ncftpput -P 12345 -u user1 -p pass1 -F *.*.*.* / testfile.bmp

相关内容