即下图的情况下运行bat之后,“UVWXYZ0001.bin”名称不变,“ABCDEF.bin”名称变为“ABC0002.bin”
图片中没看到“ABC0002.bin”,这是认真的吗- @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- set "last=UVWXYZ0000"
- for /f "delims=" %%a in ('dir /a-d/b "UVWXYZ????.bin" 2^>nul') do (
- set "last=%%~na"
- )
- set /a n=1%last:~-4%+1
- ren "ABCDEF.bin" "UVWXYZ%n:~-4%.bin"
- echo;%info%
- pause
复制代码
|