ren ???55.png ???.png
See How does the Windows RENAME command interpret wildcards? for an explanation
If the number of characters before 55 varies, then you will probably want to use a batch script. (Could be done with a fairly complicated one liner on the command line, but not worth it)
@echo off
setlocal enableDelayedExpansion
for /f "delims=" %%F in ('dir /a-d ?*55.png') do (
set "name=%%~nF"
ren "%%F" "!name:~0,-2!%%~xF"
)
If any file name might contain !, then delayed expansion must be toggled on and off within the loop.
@echo off
setlocal disableDelayedExpansion
for /f "delims=" %%F in ('dir /a-d ?*55.png') do (
set "name=%%~nF"
set "ext=%%~xF"
setlocal enableDelayedExpansion
ren "!name!!ext!" "!name:~0,-2!!ext!"
endlocal
)
See http://superuser.com/q/475874/109090 for an explanation
– dbenham Sep 01 '14 at 11:24ren ???55.png ???.pngThe only caveat is that it only works if the file name length is always 5 (3+2). For a more generic solution, a batch script is the only way to go, I guess. – and31415 Sep 01 '14 at 11:29