]> 4ch.mooo.com Git - 16.git/commitdiff
wwww 16.exe polished wwww and x4get.bat updated to handle more than 10 parts... needs...
authorsparky4 <sparky4@cock.li>
Tue, 19 Jul 2016 13:57:37 +0000 (08:57 -0500)
committersparky4 <sparky4@cock.li>
Tue, 19 Jul 2016 13:57:37 +0000 (08:57 -0500)
x4get.bat

index aa824af1bf17b0e89258aab660672916810b322a..5ad2dd3d960a7b6d5a26affa064ff231e5ddf969 100755 (executable)
--- a/x4get.bat
+++ b/x4get.bat
@@ -1,5 +1,7 @@
 @echo off\r
-del %*\r
+iff exist %* then\r
+       del %*\r
+endiff\r
 setlocal\r
 set url="4ch.mooo.com/16"\r
 rem for %@eval[%#+1] in (%*) do (\r
@@ -13,17 +15,32 @@ rem for %# in (1,1,%*) do (
        set /a o=%o+1\r
        set y=%w.z%o\r
 rem     echo y=%y\r
-       htget http://%url/%1.zip.00%o > %y\r
+       if %o lt 100 (\r
+               if %o lt 10 (\r
+                       set q=00%o\r
+               ) else (\r
+                       set q=0%o\r
+               ) endif\r
+       ) else if %o gt 99 (\r
+               set q=%o\r
+       ) endif\r
+\r
+       htget http://%url/%1.zip.%q > %y\r
+\r
 rem    pause\r
-       type %y >> %w.zip\r
+       iff exist %y then\r
+               type %y >> %w.zip\r
+       endiff\r
        iff "%@FILESIZE[%y,b]" == "65536" then\r
 rem            echo o=%o\r
                goto oooo\r
        endiff\r
        iff NOT "%#" == "0" then\r
                shift /1\r
-               unzip %w.zip\r
-               del %w.z*\r
+               iff exist %w.zip then\r
+                       unzip %w.zip\r
+                       del %w.z*\r
+               endiff\r
                goto loop\r
        endiff\r
        endiff\r