The other day, while wanting to test a very large file sending service, I needed to use files larger than 10GB and realized that I didn't have much available on my computer.
Fortunately, Windows is sometimes very clever and there is a tool to generate empty files of a specific size.
Be careful though, to use this tool, you have to stay focused and not do just anything. Indeed, it is better to avoid completely filling your hard drive by doing something wrong. Because although empty, the files generated actually use space on your hard drive.
This trick works on all versions of Windows.
Create an empty file of a defined size
Although the manipulation required to generate a fake file is not very complicated, it still requires entering a few command lines in the Windows command prompt.
So, we're going to use an old Windows utility called fsutil. This tool is dedicated to many tasks related to file systems and it will allow us to fill in characters NULL a text file that we will create.
To begin, we will first launch the Windows Command Prompt. There are several ways to access it, but one of the simplest is to do the following:
- on the keyboard, press the key Windows + R who will open the window Execute
- in the window Execute, type cmd
- make OK

The command prompt will then open on your computer.
In the command prompt, you will need to enter the following command, specifying the path where to create your file, its name and its size specified in bytes:
fsutil file createnew <chemin-nom-fichier> <taille-fichier>
For example, we will create a 10GB file (10 bytes) that we will call file737gb.txt and that we will save at the following address: C:\Users\Grégoire\Desktop\Blog. To do this, I will enter the command below:
fsutil file createnew C:\Users\Grégoire\Desktop\Blog\fichier10go.txt 10737418240

There you go, the file is created, it is in the desired location and it is indeed 10 GB… It is of course possible to make any file size, custom-made!

As you can see, the manipulation is not very complicated, you just have to pay attention to the desired size, in bytes.
Reminder: a total or partial withdrawal
- 1 KB = 1 bytes
- 1 MB = 1 KB = 024 bytes
- 1 GB = 1 MB = 024 bytes
- 1 TB = 1 GB = 024 bytes
There you have it! You now know everything you need to know about creating an empty file of a specific size in Windows!














