本帖最后由 pcl_test 于 2015-7-17 14:03 编辑
第三方工具curl
下载地址http://batch-cn.qiniudn.com/tool/curl.exe- @echo off&setlocal enabledelayedexpansion
- set "url=http://cos.myqcloud.com/11000032/szldt"
- :0
- cls
- echo;1、下载昨天生成的所有图片 2、下载当天00:00到当前时间生成的所有图片
- echo;
- set c=
- set /p c=输入相应序号并回车:
- if "%c%" equ "1" (goto 1) else if "%c%" equ "2" (goto 2) else (goto 0)
- :1
- >"%tmp%\getdt.vbs" echo;LastDate=date()-1:FmtDate=right(year(LastDate),4) ^& right("0" ^& month(LastDate),2) ^& right("0" ^& day(LastDate),2):wscript.echo FmtDate
- for /f %%a in ('cscript /nologo "%tmp%\getdt.vbs"') do set dt=%%a
- if not exist "%dt%\" md "%dt%\"
- for /l %%b in (100 1 123) do (
- for /l %%c in (100 6 154) do (
- set h=%%b
- set m=%%c
- set t=!h:~1!!m:~1!00
- curl -o ".\%dt%\%dt%!t!.png" "%url%/City440300CAPPI_%dt%!t!.png"
- )
- )
- echo;已完成下载昨天生成的所有图&ping -n 3 0 >nul&goto 0
- :2
- for /f "tokens=2 delims==" %%a in ('wmic path win32_operatingsystem get LocalDateTime /value') do set dt=%%a
- )
- set dt=%dt:~,12%
- if not exist "%dt:~,8%\" md "%dt:~,8%\"
- set /a h1=1%dt:~-4,2%
- set /a h2=%h1%-1
- set /a m=1%dt:~-2,2%
-
- for /l %%b in (100 1 %h2%) do (
- for /l %%c in (100 6 154) do (
- set a=%%b
- set b=%%c
- set t=!a:~1!!b:~1!00
- curl -o ".\%dt:~,8%\%dt:~,8%!t!.png" "%url%/City440300CAPPI_%dt:~,8%!t!.png"
- )
- )
-
- for /l %%d in (100 6 %m%) do (
- set b=%%d
- set t=!h1:~1!!b:~1!00
- curl -o ".\%dt:~,8%\%dt:~,8%!t!.png" "%url%/City440300CAPPI_%dt:~,8%!t!.png"
- )
- echo;已完成下载当天00:00到当前时间生成的所有图片&ping -n 3 0 >nul&goto 0
复制代码
|