1个回答
展开全部
@echo off
Setlocal EnableDelayedExpansion
REM 设置指定目录
set pth=D:\TEST
for /r "%pth%\" %%a in (*.JPG) do (
set fname=%%~na
if not "!fname:~13,1!"=="" (
pushd %%~dpa
ren "!fname!.JPG" "!fname:~0,13!-!fname:~13!".JPG
)
)
start "" "%pth%"
exit
Setlocal EnableDelayedExpansion
REM 设置指定目录
set pth=D:\TEST
for /r "%pth%\" %%a in (*.JPG) do (
set fname=%%~na
if not "!fname:~13,1!"=="" (
pushd %%~dpa
ren "!fname!.JPG" "!fname:~0,13!-!fname:~13!".JPG
)
)
start "" "%pth%"
exit
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询