灯塔彭于晏 当前离线
一级士官
ren C:\Users\Administrator\Desktop\*.png *.jpg ::去除_p0 @echo off set str1=_p0 echo. for /f "delims=" %%a in ('dir /a-d /b C:\Users\Administrator\Desktop\*.jpg') do ( if "%%~nxa" neq "%~nx0" ( set "file=%%a" set "name=%%~na" set "extension=%%~xa" call set "name=%%name:%str1%=%str2%%%" setlocal enabledelayedexpansion ren "!file!" "!name!!extension!" 2>nul endlocal ) ) ::去除_p1 @echo off set str1=_p1 echo. for /f "delims=" %%a in ('dir /a-d /b C:\Users\Administrator\Desktop\*.jpg') do ( if "%%~nxa" neq "%~nx0" ( set "file=%%a" set "name=%%~na" set "extension=%%~xa" call set "name=%%name:%str1%=%str2%%%" setlocal enabledelayedexpansion ren "!file!" "!name!!extension!" 2>nul endlocal ) ) ::去除_p2 @echo off set str1=_p2 echo. for /f "delims=" %%a in ('dir /a-d /b C:\Users\Administrator\Desktop\*.jpg') do ( if "%%~nxa" neq "%~nx0" ( set "file=%%a" set "name=%%~na" set "extension=%%~xa" call set "name=%%name:%str1%=%str2%%%" setlocal enabledelayedexpansion ren "!file!" "!name!!extension!" 2>nul endlocal ) ) ::去除_p3 @echo off set str1=_p3 echo. for /f "delims=" %%a in ('dir /a-d /b C:\Users\Administrator\Desktop\*.jpg') do ( if "%%~nxa" neq "%~nx0" ( set "file=%%a" set "name=%%~na" set "extension=%%~xa" call set "name=%%name:%str1%=%str2%%%" setlocal enabledelayedexpansion ren "!file!" "!name!!extension!" 2>nul endlocal ) )复制代码
459500160 当前离线
列兵
TOP
flashercs 当前在线
少校
ren C:\Users\Administrator\Desktop\*.png *.jpg powershell -Command "Convert-Path -Path C:\Users\Administrator\Desktop\*.jpg |Rename-Item -NewName {(Split-Path -Path $_ -Leaf) -replace '_p\d+',''} -Verbose"复制代码
评分人数
qixiaobin0715 当前离线
大校