@echo off setlocal title Clash Verge Rev download set "BASE=https://dl-hub.pages.dev/files" for /f "usebackq delims=" %%D in (`powershell -NoProfile -Command "[Environment]::GetFolderPath('Desktop')"`) do set "DESKTOP=%%D" if not defined DESKTOP set "DESKTOP=%USERPROFILE%\Desktop" set "TMPDIR=%DESKTOP%\dl-parts-clash" set "OUT=%DESKTOP%\Clash.Verge_2.5.10_x64-setup.exe" if not exist "%TMPDIR%" mkdir "%TMPDIR%" echo Downloading Clash Verge Rev in 3 parts. Please wait... echo Part 1 of 3: clash.part001 curl.exe -L --fail --retry 3 --retry-delay 2 -o "%TMPDIR%\clash.part001" "%BASE%/clash.part001" if errorlevel 1 goto fail echo Part 2 of 3: clash.part002 curl.exe -L --fail --retry 3 --retry-delay 2 -o "%TMPDIR%\clash.part002" "%BASE%/clash.part002" if errorlevel 1 goto fail echo Part 3 of 3: clash.part003 curl.exe -L --fail --retry 3 --retry-delay 2 -o "%TMPDIR%\clash.part003" "%BASE%/clash.part003" if errorlevel 1 goto fail echo Joining parts... copy /b "%TMPDIR%\clash.part001"+"%TMPDIR%\clash.part002"+"%TMPDIR%\clash.part003" "%OUT%" >nul if errorlevel 1 goto fail echo Verifying file... for %%F in ("%OUT%") do set "SIZE=%%~zF" if not "%SIZE%"=="60045702" goto badsize for /f "usebackq delims=" %%H in (`powershell -NoProfile -Command "(Get-FileHash -Algorithm SHA256 '%OUT%').Hash"`) do set "HASH=%%H" if /i not "%HASH%"=="929DA9303B643B80CE309AB29F618E37A5562F515D1FA55EBF5B86C822504450" goto badhash rd /s /q "%TMPDIR%" echo. echo DONE. The installer is on your Desktop: echo %OUT% echo Double-click it to install. pause exit /b 0 :fail echo. echo Download failed. Check your network, then run this file again. pause exit /b 1 :badsize echo. echo Size check failed. Run this file again. pause exit /b 1 :badhash echo. echo Hash check failed. Run this file again. pause exit /b 1