我不能批处理脚本多文件上传到FTP [英] I can't upload a multiple files to FTP by batch script

查看:210
本文介绍了我不能批处理脚本多文件上传到FTP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能成功,以多文件上传到FTP一些通过批处理文件,我做了。

I can't succeed to upload a multiple files to some FTP by batch file I made.

另外,我想所有的文件从该本地目录上传

Also, I want to upload all files from this local directory.

的code:

ftp -s:"C:\automation\fileup.bat" MYSERVER.COM

USERNAME
PASSWORD
ascii
cd "/public_html/reports/"
lcd "C:\automation\tests\HtmlReporter"
mput *
close
quit

错误:

C:\automation>ftp -s:"C:\automation\fileup.bat" MYSERVER.COM
Connected to server26.000webhost.com.
220---------- Welcome to Pure-FTPd [privsep] ----------
220-You are user number 12 of 500 allowed.
220-Local time is now 07:03. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 3 minutes of inactivity.
User (MYSERVER.COM:(none)):
331 User USERNAME OK. Password required

230-OK. Current restricted directory is /
230-109 files used (1%) - authorized: 10000 files
230 14084 Kbytes used (0%) - authorized: 1536000 Kb
ftp> ascii
200 TYPE is now ASCII
ftp> cd "/public_html/reports/"
250 OK. Current directory is /public_html/reports
ftp> lcd "C:\automation\tests\HtmlReporter"
Local directory now C:\automation\tests\HtmlReporter.
ftp> mput *
mput 000500de-0092-0095-00d9-00a100f000f7.json? close
mput 00090020-0041-007c-00db-00b9003c0085.json? quit
ftp>

中的文件,我试图上传:

推荐答案

使用 提示命令关闭转移的确认提示:

Use prompt command to turn off transfer confirmation prompts:

提示模式之间切换和关闭。

Toggles between prompt mode on and off.

如果没有它, FTP 使用下面的命令脚本(关闭退出在您的情况)作为答案。由于他们不是,传送被跳过。

Without it, ftp uses the following commands in the script (close and quit in your case) as answers. As they are not y, the transfer is skipped.

具有相同效果的另一种选择是使用上的 -i 开关的.aspx相对=nofollow> FTP 命令行

Another option with the same effect is using -i switch on ftp command-line:

-i :禁止在互动多文件传输提示。

-i : Disables interactive prompting during multiple file transfers.

这篇关于我不能批处理脚本多文件上传到FTP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆