回复 1# thp2008
可用gawk( http://bcn.bathome.net/tool/5.1.0/gawk.exe )来查找:- @rem 查找第1个有效链接
- @echo off
- rem 保存为ANSI编码格式
- set "out="
- FOR /L %%A IN (20230801,1,20230831) DO (
- for /f %%B in ('wget --spider "https://www.win-rar.com/fileadmin/winrar-versions/sc/sc%%A/rrlb/winrar-x64-623sc.exe" 2^>^&1^|gawk "NR==2{Fn=$NF}/Remote file exists\./{print Fn}"') do set "out=%%B"
- if defined out goto exit_label
- )
- :exit_label
- if defined out (
- echo;第1个有效链接:%out%
- ) else echo;未找到有效链接
复制代码
|