中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 搜索 | 上传 | 帮助 »
作者:
标题: FTP如何处理语句块 上一主题 | 下一主题
maomaoguai
初级用户





积分 26
发帖 10
注册 2007-6-11
状态 离线
『楼 主』:  FTP如何处理语句块 使用 LLM 解释/回答一下

现在网络上的解决方案都是这样,通过一个外部文件,来实行,但是我要上传的《文件名》,还有FTP ip,用户名,密码都是外部参数传入,能不能把上传部分拿到一个文件中处理,好像批处理里边不支持像unix里的语句块(ftp –n ip <<I 语句 I),怎么操作呢。

Last edited by bjsh on 2007-7-31 at 03:00 PM ]


2007-6-12 09:26
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
vkill
金牌会员





积分 4103
发帖 1744
注册 2006-1-20
来自 甘肃.临泽
状态 离线
『第 2 楼』:   使用 LLM 解释/回答一下

D:\>ncftpput -h
NcFTPPut 3.2.0

Usages:
ncftpput remote-host remote-dir local-files... (mode 1)
ncftpput -f login.cfg remote-dir local-files... (mode 2)
ncftpput -c remote-host remote-path-name < stdin (mode 3)
ncftpput -C remote-host local-path-name remote-path-name (mode 4)

Flags:
-u XX Use username XX instead of anonymous.
-p XX Use password XX with the username.
-P XX Use port number XX instead of the default FTP service port (21).
-j XX Use account XX with the account (deprecated).
-d XX Use the file XX for debug logging.
-e XX Use the file XX for error logging.
-U XX Use value XX for the umask.
-t XX Timeout after XX seconds.
-a Use ASCII transfer type instead of binary.
-m Attempt to mkdir the dstdir before copying.
-v/-V Do (do not) use progress meters.
-f XX Read the file XX for host, user, and password information.
-h XX Connect to host XX. Useful for overriding host in -f config.file.
-c Read locally from stdin and write remotely to specified pathname.
-C Similar to -c, except a local pathname is specified.
-A Append to remote files instead of overwriting them.
-z/-Z Do (do not) try to resume uploads (default: -Z).
-T XX Upload into temporary files prefixed by XX.
-S XX Upload into temporary files suffixed by XX.
-DD Delete local file after successfully uploading it.
-b Run in background (submit job to "ncftpbatch" and run).
-bb Same as "-b" but queue only (do not run "ncftpbatch").
-E Use regular (PORT) data connections.
-F Use passive (PASV) data connections (default).
-y Try using "SITE UTIME" to preserve timestamps on remote host.
-B XX Try setting the SO_SNDBUF size to XX.
-r XX Redial XX times until connected.
-o XX Specify miscellaneous options (see documentation).
-W XX Send raw FTP command XX after logging in.
-X XX Send raw FTP command XX after each file transferred.
-Y XX Send raw FTP command XX before logging out.
-R Recursive mode; copy whole directory trees.

Examples:
ncftpput -u gleason -p my.password Elwood.probe.net /home/gleason stuff.txt
ncftpput -u gleason Elwood.probe.net /home/gleason a.txt (prompt for pass)
ncftpput -a -u gleason -p my.password -m -U 007 Bozo.probe.net /tmp/tmpdir a.t
xt
tar cvf - /home | ncftpput -u operator -c Server.probe.net /backups/monday.tar


Library version: LibNcFTP 3.2.0 (August 5, 2006).

This is a freeware program by Mike Gleason (http://www.ncftp.com).
This was built using LibNcFTP (http://www.ncftp.com/libncftp/).

Last edited by vkill on 2007-6-12 at 01:37 PM ]


2007-6-12 13:36
查看资料  发送邮件  访问主页  发短消息  网志   编辑帖子  回复  引用回复
shanewest
新手上路





积分 2
发帖 1
注册 2007-6-14
状态 离线
『第 3 楼』:   使用 LLM 解释/回答一下

不错


2007-6-14 10:31
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: