Windows 10 – How to generate test files of any size

The following Command Prompt command can be used to create a test file of any length.

fsutil file createnew <filename> <filesize in bytes>

For example, to create a 10 megabyte test file:

    1. Click on the ‘Start’ button
    2. In the search box type ‘cmd’
    3. Right-click on Command Prompt and choose ‘Run as administrator’
    4. Windows10-GenerateFile1
    5. Enter the following command:
    6. fsutil file createnew C:\TestFile.txt 10485760
    7. Windows10-ClearRecentFiles2
    8. The file will be located in the C:\ directory.