24 дек. 2024 г.

Create random file from 1 to x Megabytes, jitters disk free space (correct BDE bug)

 @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