guaiwu 当前离线
三级士官
@echo off setlocal enabledelayedexpansion for /f %%i in ('dir *.txt /b /o:n') do ( set /a a=%%~ni rename %%i !a!.txt ) pause复制代码
评分人数
ArdentMan 当前离线
中尉
TOP
sxw (^_^)当前离线
少尉
Hello123World 当前离线
荣誉版主
set /a a=%%~ni复制代码
@Echo Off @echo off setlocal enabledelayedexpansion for /f %%i in ('dir *.txt /b /o:n') do ( set a=%%~ni rename %%i !a!.txt ) Pause>Nul复制代码
545810831 当前离线
二级士官
@Echo Off @echo off setlocal enabledelayedexpansion for /f %%i in ('dir *.txt /b /o:n') do ( set a=%%~ni set a=!a:~1! rename %%i !a!.txt ) Pause>Nul复制代码
CUer 当前离线
上尉
@echo off setlocal enabledelayedexpansion for /f %%i in ('dir /b /o:n *.txt') do ( set /a a=1%%~ni%%10 ren %%i !a!.txt )复制代码