Byothe.frTutorialsCreate an empty file of a specific size in Windows?

Create an empty file of a specific size in Windows?

Article updated on October 5, 2026

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:

  1. on the keyboard, press the key Windows + R who will open the window Execute
  2. in the window Execute, type cmd
  3. make OK
windows window run

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
custom size file creation prompt command

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!

creation file custom size prompt command result

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!

Add Byothe.fr to my favorite Google sources
Byothe
Byothehttps://byothe.fr
As a forty-something dad fascinated by the web, I spend a lot of my time keeping watch to find you the best news. Tips and tricks, humor, websites and high-tech are the main subjects I want to cover here… but I will not fail to offer you good deals gleaned here and there on the web…

Related articles

LEAVE A COMMENT

Please enter your comment!
Please enter your name here


Discord

Want to chat live? Come and meet us on the Byothe.fr Discord server

Newsletter

Subscribe and receive a summary of web news every Monday

Latest news

Randomly