Generating test files on windows

Need to generate a test file of a certain size on a Windows machine? On linux you’d use the ‘dd’ tool and use /dev/zero as an input. Luckily, there is an equivalent on Windows:

fsutil file createnew <filename> <size in bytes>

So for example,. this will create a 1MB test file:

fsutil file createnew test.bin 1048576

Nice for testing harddrives that give disk failures :)