本帖最后由 Gin_Q 于 2020-3-21 18:13 编辑
- @echo off& setlocal enabledelayedexpansion &rem by Gin
- ::可以检查是否拖入了上一次文件(间隔超过一次无法检测)
- ::如果中间删掉了一个文件可以自动补充(需要重新打开程序)
- ::需要把程序放在修改后的图片文件目录
-
- ::检查文件名
- for /l %%a in (1,1,999) do (
- if %%a lss 10 ( if not exist "00%%a.jpg" ( echo 正在处理第%%a个文件
- call :input
- copy "!file!" "00%%a.jpg"))
- if %%a geq 10 ( if %%a lss 100 (if not exist "0%%a.jpg" ( echo 正在处理第%%a个文件
- call :input
- copy "!file!" "0%%a.jpg")))
- if %%a geq 100 ( if not exist "%%a.jpg" ( echo 正在处理第%%a个文件
- call :input
- copy "!file!" "%%a.jpg"))
- )
- echo 文件数已到达999!
- pause&exit
- :input
- set /p file=请拖入文件:
- if "!file!" equ "!che!" goto :input
- set "che=!file!"
- exit /b 0
复制代码
|