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


    已更新

TOP

回复 80# 依山居


    测试无误,点击版本号下载
http://www.bathome.net/s/tool/?key=apm

TOP

本帖最后由 CrLf 于 2015-10-21 01:24 编辑

回复 83# 依山居


更新后的 APM 已变成包含 dll 的压缩包,要用 Get-Tool APM.rar 才行
Get-Tool 是直接通过 wget "地址+用户输入" 来运作的
七牛云是类 xUnix 系统,所以需要区分大小写、需要指明是否rar、若有同名文件需指明版本
因为七牛云只是云存储平台,无法使用 php,所以只有路径完全正确才能成功下载
---------------------------------------------------------------------------------------------
这里用 JS 库简单写一个改进方案,在 wget 失败时调用 mshta 进行智能下载
在 :tool 标签提示失败的地方加上一句 goto :tool_hta,然后再脚本末尾加上一段:
  1. :tool_hta
  2. if not exist "%ProgramPath%Data\Plugin\Download-Tool.hta" (
  3. md "%ProgramPath%Data\Plugin" 2>nul
  4. wget -O "%ProgramPath%Data\Plugin\Download-Tool.hta" -q "http://batch-cn.qiniudn.com/plugin/Download-Tool.bat"
  5. ( break >"%ProgramPath%Data\Plugin\Download-Tool.hta:Zone.Identifier" ) 2>nul
  6. )
  7. For %%h In ("%ProgramPath%Data\Plugin\Download-Tool.hta") Do (
  8. If %%~zh gtr 21 (
  9. for /f "delims=" %%i in ('mshta "file://%ProgramPath%Data\Plugin\Download-Tool.hta" "%~1" "%ProgramPath%Data\Tools\"') do (
  10. if %%i neq *Failed* If %%~zi gtr 21 (
  11. If /i "%%~xi"==".rar" rar x -y "%ProgramPath%Data\Tools\%%~nxi" "%ProgramPath%Data\Tools\" >nul 2>nul
  12. Echo 下载成功
  13. Goto :Eof
  14. )
  15. )
  16. )
  17. )
  18. Echo 下载失败,请确认输入无误
  19. Del "%ProgramPath%Data\Tools\%~nx1!Suffix!"
  20. Goto :Eof
复制代码
当然你也可以用 :tool_hta 替换 :tool 的内容
只是权宜之计,已经联系 bailong360,看下个版本的 Batch-CN 能否改进
当然,你也可以通过浏览器访问 url 来下载符合条件的第三方工具 http://www.bathome.net/s/tool/?down=apm

TOP

TOP

返回列表