Tente isso. Não é bonito, porque isso * $ #? editor perdeu o recuo, quebra de linha, Etc.
--- SCRIPT REVISTO
@echo off
setlocal
set ROOT_DIR=c:\temp\test
for /f "tokens=*" %%D in ('dir /ad /b "%ROOT_DIR%"') do call :PROCESS_DIR "%ROOT_DIR%" "%%D"
endlocal
goto END
:PROCESS_DIR
set PD_ROOT=%1
set PD_ROOT=%PD_ROOT:"=%
set PD_DIR=%2
set PD_DIR=%PD_DIR:"=%
set PD_FIRST_FILE=
set PD_SOURCE_FILE=
REM ***
REM *** GET THE NAME OF THE FIRST FILE IN THIS FOLDER.
REM ***
for /f "tokens=*" %%F in ('dir /o-n /b "%PD_ROOT%\%PD_DIR%"') do set PD_FIRST_FILE=%%F
if "%PD_FIRST_FILE%" == "" (
echo WARNING : No files found in [%PD_DIR%] - skipping.
goto END
)
set PD_SOURCE_FILE=%PD_ROOT%\%PD_DIR%\%PD_FIRST_FILE%
REM ***
REM *** CREATE FILES.
REM ***
for /l %%I in (1,1,100) do call :CREATE_FILE_COPY "%PD_ROOT%\%PD_DIR%" "%PD_SOURCE_FILE%" 00%%I
goto END
:CREATE_FILE_COPY
set CFP_DIR=%1
set CFP_DIR=%CFP_DIR:"=%
set CFP_FILE=%2
set CFP_INDEX=%3
set CFP_FILE_NO_EXT=
REM ***
REM *** GET FILE NAME WITHOUT EXTENSION.
REM ***
for /f %%F in ("%CFP_FILE%") do set CFP_FILE_NO_EXT=%%~nF
REM ***
REM *** COPY THE FILE.
REM ***
copy /y %CFP_FILE% "%CFP_DIR%\%CFP_FILE_NO_EXT%.%CFP_INDEX:~-3%
goto END
:END