@ECHO OFF
SET /A NUM=1+(%random%)%%(19)
DEL SOMEMEGABYTES
COPY MEGABYTE SOMEMEGABYTES
FOR /L %%i IN (1,1,%NUM%) DO (
ECHO %%i
COPY /Y /B SOMEMEGABYTES TEMPFILE
COPY /Y /B MEGABYTE+TEMPFILE SOMEMEGABYTES
)
DEL TEMPFILE
SET /A NUM=1+(%random%)%%(19)
DEL SOMEMEGABYTES
COPY MEGABYTE SOMEMEGABYTES
FOR /L %%i IN (1,1,%NUM%) DO (
ECHO %%i
COPY /Y /B SOMEMEGABYTES TEMPFILE
COPY /Y /B MEGABYTE+TEMPFILE SOMEMEGABYTES
)
DEL TEMPFILE