Alright. I have done it.
@echo off
setlocal enabledelayedexpansion
rem Loop through existing .xhtml files in reverse order
for /L %%i in (478, -1, 0) do (
if exist %%i.xhtml (
set /a newnum=%%i + 1
rem Attempt to rename the file
ren %%i.xhtml !newnum!.xhtml
)
)
endlocal
Make sure to indicate the highest number name in the code. My was 478.