windows 在 FileZilla 中下载文件的命令行选项
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28022567/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Command line option to download file in FileZilla
提问by wazza
I am using FileZilla (GUI) to download files from an FTP server. Can any one tell me a command line argument to download file from FTP server to local file system?
我正在使用 FileZilla (GUI) 从 FTP 服务器下载文件。任何人都可以告诉我从 FTP 服务器下载文件到本地文件系统的命令行参数吗?
回答by Martin Prikryl
FileZilla does not have any command line arguments (nor any other way) that allow automatic transfer.
FileZilla 没有任何允许自动传输的命令行参数(也没有任何其他方式)。
See:
FileZilla Client command-line arguments
https://trac.filezilla-project.org/ticket/2317
请参阅:
FileZilla 客户端命令行参数
https://trac.filezilla-project.org/ticket/2317
Though you can use any other FTP client that allows automation.
虽然您可以使用任何其他允许自动化的 FTP 客户端。
Built-it Windows
ftp.exe
(use itsget
command).Though Windows
ftp.exe
does not support a passive mode, what makes it useless nowadays, when connecting over Internet due to ubiquitous firewalls and NATs.WinSCP: You can automatically make it download a file both in GUI and scripting mode
GUI:
winscp.exe ftp://user:password@host/path/file.ext
You will get a dialog, where you select a directory to download the file to.
Scripting (put the command to a
.bat
file):winscp.com /command ^ "open ftp://user:password@host/" ^ "get /path/file.ext c:\" ^ "exit"
The WinSCP can even generate a scriptfrom an imported FileZilla session.
For details, see a guide to FileZilla automation.
(I'm the author of WinSCP)
内置 Windows
ftp.exe
(使用其get
命令)。尽管 Windows
ftp.exe
不支持被动模式,但由于无处不在的防火墙和 NAT,当通过 Internet 连接时,它现在变得无用了。WinSCP:您可以在 GUI 和脚本模式下自动使其下载文件
图形用户界面:
winscp.exe ftp://user:password@host/path/file.ext
您将看到一个对话框,您可以在其中选择要将文件下载到的目录。
脚本编写(将命令放入
.bat
文件):winscp.com /command ^ "open ftp://user:password@host/" ^ "get /path/file.ext c:\" ^ "exit"
WinSCP 甚至可以从导入的 FileZilla 会话生成脚本。
有关详细信息,请参阅FileZilla 自动化指南。
(我是 WinSCP 的作者)
回答by user797717
FileZilla does support some basic command line options for the upload and download of files. Not all options are documented. You can download a file with the option "-d sourcefiletargetdir"
FileZilla 确实支持一些用于上传和下载文件的基本命令行选项。并非所有选项都记录在案。您可以使用选项“-d sourcefile targetdir”下载文件
Example (download):
示例(下载):
filezilla.exe -d ftp://user:[email protected]/folder/* "c:\downloads\" ? /overwrite /close
Example (upload):
示例(上传):
filezilla.exe -u "c:\temp\samplefile.exe" ?ftp://user:[email protected]/folder /overwrite /close
/close -- will close the GUI after the download/upload completes
/close -- 将在下载/上传完成后关闭 GUI
/overwrite -- will overwrite the files in target without prompting the user
/overwrite -- 将覆盖目标中的文件而不提示用户
You can also connect to a site from the site manager e.g. --site="0/site1".
您还可以从站点管理器连接到站点,例如 --site="0/site1"。
Below are reference sites with further examples including download links to FileZilla versions (2.32 / 3.1) that supported the feature.
以下是包含更多示例的参考站点,包括支持该功能的 FileZilla 版本 (2.32 / 3.1) 的下载链接。