forked from Laforeta/PEROist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FetchHistoricalRank.bat
58 lines (48 loc) · 1.36 KB
/
FetchHistoricalRank.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
SET ME=%~n0
SET PARENT=%~dp0
@ECHO Running %ME%
REM Set binary path
PATH %PARENT%bin
REM Get current date and set month as variable
FOR /f "tokens=1-3 delims=/ " %%g in ('doff mm/dd/yyyy') do (
SET mm=%%g
SET dd=%%h
SET yyyy=%%i
)
CD DOWNLOAD
REM Download ranking results from 2013 (Jun to Dec, server 1-16)
FOR /L %%G in (6,1,12) DO (
SET MONTH=00%%G
SET PADDED_MONTH=!MONTH:~-2!
FOR /L %%G in (1,1,16) DO (
SET SERVER=00%%G
SET PADDED_SERVER=!SERVER:~-2!
wget http://203.104.209.7/kcscontents/information/image/rank13!PADDED_MONTH!!PADDED_SERVER!.jpg
)
)
REM Download ranking results from 2013 (Jan to Dec, server 1-19)
FOR /L %%G in (1,1,12) DO (
SET MONTH=00%%G
SET PADDED_MONTH=!MONTH:~-2!
FOR /L %%G in (1,1,19) DO (
SET SERVER=00%%G
SET PADDED_SERVER=!SERVER:~-2!
wget http://203.104.209.7/kcscontents/information/image/rank14!PADDED_MONTH!!PADDED_SERVER!.jpg
)
)
REM Download ranking results from 2013 (Jan to Dec, server 1-20)
FOR /L %%G in (1,1,12) DO (
SET MONTH=00%%G
SET PADDED_MONTH=!MONTH:~-2!
FOR /L %%G in (1,1,20) DO (
SET SERVER=00%%G
SET PADDED_SERVER=!SERVER:~-2!
wget http://203.104.209.7/kcscontents/information/image/rank15!PADDED_MONTH!!PADDED_SERVER!.jpg
)
)
REM Download ranking results from 2016 (Not active yet)
FOR /L %%G in (1,1,20) DO (
:EXIT
EXIT /b 0