批处理FTP MGET命令不带通配符的工作? [英] Batch FTP mget command not working with wildcard?
本文介绍了批处理FTP MGET命令不带通配符的工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经写一个批处理脚本登录到我的FTP服务器,然后导航到一个目录。我有与MGET命令,我想它下载目录中每个.dat文件的麻烦,但它只是返回这个错误:
无法访问文件'/home/minecraft/multicraft/servers/server267/world/players/*.dat':No这样的文件或目录。
200类型设置为:ANSI
找不到远程文件列表
下面是我的脚本(RAN从CMD)
开放66.71.244.202
用户
密码
CD /世界
CD播放器
MGET的* .dat
解决方案
当您执行与FTP脚本文件,你必须关闭文件名匹配,这将允许在脚本中使用通配符。例如:
FTP -n -i -s:scriptfile.txt
应该工作,但
FTP -n -i -g -s:scriptfile.txt
不会的。
I have written a batch script that logs into my ftp server, then navigates to a directory. I am having trouble with the mget command, I want it to download every .dat file in the directory, but it simply returns this error:
Cannot access file '/home/minecraft/multicraft/servers/server267/world/players/*.dat':No such file or directory.
200 Type set to: ANSI
Cannot find list of remote files
Here is my script (ran from cmd)
open 66.71.244.202
USER
PASSWORD
cd /world
cd players
mget *.dat
解决方案
When you execute your script file with ftp, you have to turn off the globbing which will allow the use of wildcards in the script. For example:
ftp -n -i -s:scriptfile.txt
should work but
ftp -n -i -g -s:scriptfile.txt
will not.
这篇关于批处理FTP MGET命令不带通配符的工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文