不使用第三方工具的版本:- @echo off
- echo.
- echo 探测WinRAR下载地址
- echo.
- set /p year=请输入要探测的年份,例如:2023 :
- echo.
- set /p yue=请输入要探测的月份(必须是两位输入,不足补0,例如:08):
- echo.
- set /p banben=请输入要探测的WinRAR版本,例如:623 :
- echo.
- echo 要探测的WinRAR下载地址为:https://www.win-rar.com/fileadmin/winrar-versions/sc/sc%year%%yue%01---%year%%yue%31/rrlb/winrar-x64-%banben%sc.exe
- echo.
- echo 探测中,请稍后......
- echo.
- setlocal enabledelayedexpansion
- for /l %%i in (101,1,131) do (
- set "ThisDay=%%i"
- wget --spider https://www.win-rar.com/fileadmin/winrar-versions/sc/sc%year%%yue%!ThisDay:~1!/rrlb/winrar-x64-%banben%sc.exe 2>&1 | findstr /c:"Remote file does not exist"
- if errorlevel 1 (
- echo 找到有效链接:https://www.win-rar.com/fileadmin/winrar-versions/sc/sc%year%%yue%!ThisDay:~1!/rrlb/winrar-x64-%banben%sc.exe & goto end
- ) else (
- echo.
- )
- )
- echo.
- :end
- echo.
- pause
复制代码
|