我有一些文件,我想从文件名中删除前 3 个字符,我认为这会起作用,但它只是输出:
MISEQPRF.txt
ECHO is off.
ECHO is off.
@echo off
for %%a in (%MIS*.TXT) do (
SET oldName = %%a
SET newName = %oldName:~3%
echo %%a
echo %oldName%
echo %newName%
)
pause
注意:然后我会修改,REN %aa %newName
但首先要确保名称正确。