I want to test out a hard disk by generating a large file (let's say
20Gb) to it. I don't care what its contents actually are, it could be
random as far as I can. [Snip]
File Generator 1.0 -->
http://www.winsite.com/bin/Info?21000000037189
causes an "illegal instruction" on xp sp2
WinXP comes with fsutil. Use the <file createnew> subcommand.
Btw.:
There are several tools available which change file size, create custom
data sets and so on. At the moment I remember ChSize:
http://www.dmares.com/maresware/freesoftware.htm
which will work up to 4 GByte. So it is not sufficient for the OP.
Another one is Random file generator by Christian Maas:
http://www.chmaas.handshake.de/delphi/freeware/freeware.htm
I don't know the maximum file size supported and will not test this at
the moment, because this program is best for creating defined data sets,
but a bit slow when used to create large files. But it *will* create
files of several hundred MByte.
I myself stick to pure 'copy' in most cases. A simple batch file
containing the following lines will multiply any file size by 1000
while preserving (and multiplying) the contents, too:
| del ~?.tmp
| copy %1 ~1.tmp
| copy ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp ~2.tmp
| copy ~2.tmp + ~2.tmp + ~2.tmp + ~2.tmp + ~2.tmp + ~2.tmp + ~2.tmp + ~2.tmp + ~2.tmp + ~2.tmp ~1.tmp
| copy ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp + ~1.tmp ~2.tmp
| ren ~2.tmp %2
| del ~1.tmp
If the Batch is called BlowFile.bat, it will be executed as follows
(where Infile and Outfile must be replaced with the appropriate names):
BlowFile Infile Outfile
By adding or removing 'copy' lines I can immediately change the factor.
If non-textual files shall be used, the /b switch has to be added. The
batch contains almost no error handling. But it will not overwrite an
already existing output file. In that case (or if no output file has
been given at all) the data remains in the ~2.tmp file. To ensure that
no old temp files will be used if no parameter has been given the first
delete has been inserted.
Simple, but it works... ;-)
BeAr