- @echo off
- setlocal enabledelayedexpansion
- set /a a=1
- for /f "delims=" %%i in (urls.txt) do (
- for /f %%j in ("%%i\..\..") do set "aa=%%~nxj" & md "%%~nxj" 2>nul
- dezoomify-rs -l --accept-invalid-certs -H "Cookie: SSO_SESSIONID=FDDC5D671B873413C25B83569579A723" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.95 Safari/537.36" %%i !aa!/!a!.jpg
- set /a a+=1
- timeout /t 0
- )
-
- pause
复制代码 代码没有问题,但有个小的bug。
urls.txt 内容给为:C:\Users\Administrator\Desktop\1\5976\1\tiles.yaml
C:\Users\Administrator\Desktop\1\5976\2\tiles.yaml
C:\Users\Administrator\Desktop\1\5976\3\tiles.yaml
C:\Users\Administrator\Desktop\1\5977\4\tiles.yaml
C:\Users\Administrator\Desktop\1\5977\5\tiles.yaml
C:\Users\Administrator\Desktop\1\5977\6\tiles.yaml
C:\Users\Administrator\Desktop\1\5977\7\tiles.yaml
最终新建了5976 5977 两个文件夹 ,a的值为a+=1 ,图片最终保存到 5976 5977里面的,能否判断保存文件夹发生变化时a重新赋值为1 |