简体   繁体   English

Windows命令行中的mget命令FTP客户端不下载文件

[英]mget command in Windows command line FTP client does not download files

I'm trying to achieve something simple - other solutions I've found have not worked for me. 我正在努力实现一些简单的事情 - 我发现的其他解决方案对我没用。

I want to use the windows scheduler to run a cmd file, to FTP to a server, and download all of the *.csv files in the default directory, the local directory the file is being run from. 我想使用Windows调度程序运行cmd文件,FTP到服务器,并下载默认目录中的所有* .csv文件,即运行文件的本地目录。

Files in the remote directory are: 远程目录中的文件是:

20161101.csv ... 20161129.csv 20161101.csv ... 20161129.csv

I created this file, and called it d.ftp: 我创建了这个文件,并将其命名为d.ftp:

open 123.345.456.567
username
password
binary
mget *.csv
disconnect
quit

I then go to the windows command (CMD) and type: 然后我转到Windows命令(CMD)并输入:

ftp -s:d.ftp

All that happens is I see: 所有这一切都是我看到的:

ftp> open 123.345.456.567
Connected to 123.345.456.567
220
User (123.345.456.567:(none)):
331 Password required for username (actual username is shown on the screen)

230 User username logged in.
ftp> binary
200 Type set to I.
ftp> mget *.csv
200 Type set to I.
mget 20161101.csv? disconnect
mget 20161102.csv? quit
ftp>

No files are copied to my local directory, no CSV files are transferred. 没有文件复制到我的本地目录,也不会传输任何CSV文件。

Any ideas? 有任何想法吗?

Thanks for any help. 谢谢你的帮助。

Mark 标记

You have to use the prompt command or the -i command-line switch to suppress the confirmation prompts ( mget 20161101.csv? ) before each file transfer. 您必须使用prompt命令-i命令行开关在每次文件传输之前禁止确认提示( mget 20161101.csv? )。

open 123.345.456.567
username
password
binary
prompt
mget *.csv
disconnect
quit

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM