@echo off & SETLOCAL EnableDelayedExpansion
echo 批量改檔案名的bat求注解,感謝感謝!
dir /b /s *.txt>1.h
set FileEx=
for /f "tokens=* " %%i in (1.h) do (
set FileEx=%%i
set FileEx=!FileEx:~0,-4!
ren "!FileEx!.txt" "*.bat"
)
del 1.h
pause
echo 這是我找的一個bat 改字尾名 拜托拜托解釋一下.
echo 你要修改的是 主檔案名 還是擴充名?.
echo 你要把所有的 txt改為 bat?
echo 要是改擴充名
echo ren *.txt *.bat 就行了