@echo off & title 添加前或后缀 By 依梦琴瑶
::设置前缀,不加留空
set Fx=
::设置后缀,不加留空
set Ex=-副本
for %%a in (*) do (
if not "%~0"=="%%~fa" "ren "%%~a" "%Fx%%%~na%Ex%%%~xa"
)
for /d %%a in (*) do (
"ren "%%~a" "%Fx%%%~na%Ex%%%~xa"
)
pause
@echo off
set @=q&set/an=0x53b7e0b4
title Any question +%@%%@% %n%
cd /d "%~dp0"
set "fd=%~dp0"
for /f "delims=" %%a in ("%fd:~,-1%") do set "fd=%%~nxa"
for /f "delims=" %%a in ('dir /a-d/b^|find /v "%~nx0"') do (
echo;"%%a" --^> "%fd%_%%~nxa"
ren "%%a" "%fd%_%%~nxa"
)
echo;Any question +%@%%@% %n%
pause
可以用Faststone image viewer,里面工具菜单中可以批量改名
@echo off setlocal enabledelayedexpansion set "pt=c:\wangjunke" set /p "name=输入你要更名的字符: " for /f "tokens=1,* delims=." %%i in ('dir /b/a %pt%\*.tif') do ( ren %pt%\%%i.%%j %name%.%%j )