You may need to create a file of a certain size in Windows when testing the writing speed of disks, checking quotas on the size of transferred or stored data. Usually such files are dummy files representing a continuous block of zeros. They can have any extension or not have it at all. The latter is unimportant, the main thing is that they occupy a given amount of disk space.
In Windows, you can create such files using the built-in fsutil.exe console utility. You can also use third-party alternatives with a graphical interface and batch mode support.
Create a file of a certain size on Windows
- Open the command prompt or Windows Terminal.
- Type the following command
fsutil file createnew <file path> <size>.
- Replace <file path> with the full path to the dummy file you want to create.
- Specify <size> in bytes for your new file.
For example, the command
fsutil file createnew D:\file.txt 1024000 will create a new file of 1MB in the root of the D: partition.
You can also use some of the third-party tools. Sometimes third-party tools are more useful than the built-in fsutil tool, as they offer extra features. We reviewed those that we like below.
Blank File Generator
Blank File Generator is a portable app. Blank File Generator does not support batch mode. But it supports additional options like writing in blocks. The user can also choose the method of filling the file: with zeros, spaces or random bytes. Block writing can be used to improve performance when creating large files, such as 500 MB or more. The larger the block, the faster the file will be created. By default, files created in Blank File Generator have the EAT extension.
Dummy File Creator
The Dummy File Creator app does not require installation. It can create dummy files in batch mode.
You can specify the size of the generated file in bytes, kilobytes, megabytes and gigabytes. It also allows you set set a name with an extension (the default extension is .dummy), and the number of files that will be automatically named.
Create Dummy Files
This dummy file creation tool differs in that it can assign attributes to the created files. For example, the resulting file be get read-only, archived, hidden, and even system attributes. It also shows basic information about hard disk partitions, such as the serial number of the disk, volume label and free space.
The name and extension of the generated file can be specified manually. The file contents can also be customized. Additionally, the user can set the file size in bytes, kilobytes, megabytes and gigabytes. It also supports batch operation and overwriting of already created files. The main disadvantage of Create Dummy Files is that it is slow: it takes almost two minutes to create a single 100 MB file.
FileFiller is an old portable utility known since the XP days for creating dummy files of a given size. It creates files in bytes, kilobytes, megabytes, and gigabytes. The files can contain spaces, random values, and ASCII characters. By default, files generated by FileFiller have the DAT extension.
Random Garbage File Creator
The last tool we want to review is Random Garbage File Creator. It is a portable app for creating files with a random set of data and a random size.
It doesn’t support creating files of a known size. The “Max. number of bytes” specifies only the maximum size of the generated file. That is, if you specify 2000 bytes in this field, Random Garbage File Creator will create a file of random size from 1 to 2000 bytes.
In the “Number of files to create” field, you can specify the number of files to be created. When creating each new file, the utility will ask for a name an/or extension.