- @echo off
- setlocal enabledelayedexpansion
- >%temp%\bathome.txt echo,
- >>%temp%\bathome.txt type 改名.txt
- set n=1
- for /f "delims=" %%a in ('dir /b *.jpg') do (
- set skip=skip=!n!
- call :changename "!skip!" "%%a"
- set /a n+=1
- )
- goto :eof
-
- :changename
- for /f "%~1 delims=" %%b in (%temp%\bathome.txt) do (
- ren "%~2" "%%b.jpg"
- goto :eof
- )
复制代码
|