Quickly create large file on a Windows system
You can use the Sysinternals Contig tool. It has a -n
switch which creates a new file of a given size. Unlike fsutil
, it doesn't require administrative privileges.
fsutil file createnew <filename> <length>
where <length>
is in bytes.
For example, to create a 1MB (Windows MB or MiB) file named 'test', this code can be used.
fsutil file createnew test 1048576
fsutil
requires administrative privileges though.