forked from sparky4/16
/
x4get.bat
executable file
·60 lines (59 loc) · 1 KB
/
x4get.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
59
60
@echo off
iff exist %* then
del %*
endiff
setlocal
set url="4ch.mooo.com/16"
rem for %@eval[%#+1] in (%*) do (
rem for %# in (1,1,%*) do (
:loop
set /a o=0
:oooo
set /a q=%@EVAL[%@LEN[%1] - 4]
set w=%@INSTR[0,%q,%1]
iff NOT "%w" == "" then
set /a o=%o+1
set y=%w.z%o
rem echo y=%y
if %o lt 100 (
if %o lt 10 (
set z=00%o
) else (
set z=0%o
) endif
) else if %o gt 99 (
set z=%o
) endif
htget http://%url/%1.zip.%z > %y
rem pause
iff NOT "%@FILESIZE[%y,b]" == "0" then
type %y >> %w.zip
iff "%@FILESIZE[%y,b]" == "65536" then
rem echo o=%o
goto oooo
endiff
iff NOT "%#" == "0" then
shift /1
iff exist %w.zip then
unzip %w.zip
del %w.z*
endiff
goto loop
else
del %#
endiff
else
del %y
echo Error null zip file wwww
endiff
else
rem del %y.z*
rem need to add a cleaner wwww
echo done~ wwww
endiff
rem echo y="%y"
rem echo q=%q
rem echo o=%o
rem echo w=%w
rem echo %%1=%1
endlocal