3 Ways to Create Random Dummy Files in Windows, with a Given Size

Do you need to create dummy files with a given size, to perform tests with them? Do you need those files to have some actual content? If you do, luck has it that there are some good alternatives for Windows. It's not just the Linux geeks who can create dummy files using the command line. Windows geeks can do the same. Here are three ways to create such files in any modern version of Windows.

1. Create Random Dummy Files from the Command Prompt

Starting with Windows Vista, all versions of Windows include an executable named fsutil.exe. It is found in the "C:\Windows\WinSxS\x86_microsoft-windows-fsutil_31bf3856ad364e35_6.3.9600.16384_none_6103d9000b86316f" folder. Fsutil.exe is a very powerful tool for managing partitions and volumes. Among many other things, it can be used to quickly create dummy files of any size.

Start the Command Prompt and type fsutil. You will see a list of commands that are supported by this tool. They each have a long list of parameters that can be used.

This only gives you a taste of what fsutil.exe can do. Complete information about its capabilities can be found in its official documentation on TechNet.

But, let's get back to our business - how to create a dummy file from the Command Prompt. You type "fsutil file createnew filename length" or "fsutil file createnew path\filename length".

Let's share some examples, so that you have a better understanding of how it works. First of all, the length is measured in bytes, so you need to know your conversions. If you don't, then use this online converter. The name of the file can be anything.

First, I created a file named "myfile.txt" with a size of 63.4 KB (65000 bytes). To create it, I typed the following command: "fsutil file createnew myfile.txt 65000".

When you don't specify a path, the file is created in your user profile folder. In my case, it was stored at "C:\Users\Ciprian\myfile.txt".

Next, I created another file, this time using a specific path. I typed: "fsutil file createnew D:\myfile.txt 1000000".

The files that are created with fsutil.exe are empty. There's no content inside.

Credit: As you can imagine, I was not the first to discover this tool. The source where I first read about it can be found here.

2. Create Random Dummy Files with Dummy File Creator

If you are not a geek or IT professional that loves the Command Prompt, then you should consider using third-party applications. A free and easy to use tool is the Dummy File Creator.

You can download its installer as well as an archive. I recommend that you get the archive and extract it somewhere on your computer. Then, run the Dummy.exe file. If you want to generate files on your system drive, don't forget to right click and select "Run as administrator". Otherwise, when creating files, the program will return an error.

The interface of this program is very simple. You set if you want to generate one file or more. Then, you browse to the location where you want the file(s) created, type the name and extension. Next, you specify the size you need and set whether you want it to have some random file content or not. By default, this program creates empty files.

When you press Create, a progress bar is shown. You are notified when the file is created.

The advantages of this program over fsutil.exe are that it can be easily used by people that don't like the Command Prompt and that it can create files with random content.

3. Create Random Dummy Files with Disk Tools

Another free alternative that provides more customization options is the Disk tools toolkit. As the name implies, this is a suite of small free disk related tools. One of these tools is the File Generator.

Download the self-extracting archive found on its website and unpack the content on your PC. Out of all the files included in this suite, you need to use Disk Tools.exe.

Run it and you will see many tabs with tools for doing different things. You will work only with the File generator tab.

Here you'll find everything you need for creating dummy files:

  • You can set the number of generated files.
  • You can set the file size in bytes, KB, MB or GB.
  • You can set the file name and where the file is stored.
  • You can set the file content, if you don't want it filled with random characters.

When done setting things up, press Create and wait for the beep that signals that the file was created.

What I loved about this program is that it provides very good configuration options and it is able to create files with actual content. Sometimes this is very important.


I hope you found this guide useful. If you know other ways to create dummy files in Windows, don't hesitate to share them via the comments form below.