[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[其他] FTP处理完一部分命令后,批处理再发送命令过去。。。

  1. echo open ******.gotoip.net>d:\ham\ftp\command.txt
  2. echo user ********>>d:\ham\ftp\command.txt
  3. echo ***********>>d:\ham\ftp\command.txt
  4. echo bin>>d:\ham\ftp\command.txt
  5. echo prompt>>d:\ham\ftp\command.txt
  6. echo cd www/9010>>d:\ham\ftp\command.txt
  7. echo pwd>>d:\ham\ftp\command.txt
  8. echo lcd d:\ham>>d:\ham\ftp\command.txt
  9. start ftp -v -i -n -s:command.txt
  10. echo put rec.txt>>%Log_Path%command.txt
  11. ping -n 10 127.1 >nul
  12. ==================下面这个就没响应了=======================
  13. echo put rec.txt>>%Log_Path%command.txt
复制代码
很奇怪,再把命令写进去,根本没效。
因为在这个位置我还要判断很多东西,这个只是一个框框

[ 本帖最后由 topscan 于 2009-11-23 19:44 编辑 ]

各位老大,帮帮忙啊!

TOP

start ftp 放在最后
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

  1. echo open cd452.gotoip.net>d:\ham\ftp\command.txt
  2. echo ******>>d:\ham\ftp\command.txt
  3. echo **********>>d:\ham\ftp\command.txt
  4. echo bin>>d:\ham\ftp\command.txt
  5. echo cd www/9010>>d:\ham\ftp\command.txt
  6. echo pwd>>d:\ham\ftp\command.txt
  7. echo lcd d:\ham>>d:\ham\ftp\command.txt
  8. echo put rec.txt>>%Log_Path%command.txt
  9. ping -n 5 127.1 >nul
  10. echo put rec.txt>>%Log_Path%command.txt
  11. start ftp -i -s:command.txt
复制代码


问题这些中间要要干的活,例如判断什么的全不起作用了
ping -n 5 127.1 >nul

超级郁闷。我看过别人备份脚本差不多这样的形式,但是他能一边执行ftp 一边根据ftp返回的信息来处理。
yun

TOP

回复 4楼 的帖子

把ftp的返回信息放到一个日志文件里面,再用批处理读取这个文件里面的内容来作出判断。
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

返回列表