How to Use the Windows 11 fsutil Command to Create Dummy Files for Testing

When configuring a new server, testing upload speeds to a cloud provider, or verifying that a backup script functions correctly when a hard drive is near capacity, you need sample data. Downloading large files from the internet simply to test transfer speeds introduces network bottlenecks that skew your results. The most efficient solution is to generate your own “dummy” files locally. In Windows 11, you can achieve this instantly using the built-in fsutil command-line utility.

Why Use fsutil Instead of Copying Files?

The fsutil command interacts directly with the Windows NTFS file system to allocate space instantly. If you need a 10GB file for a test, manually copying a movie file takes time and processor overhead. In contrast, fsutil creates a perfectly sized, completely empty file (filled with zeroes) in a fraction of a second, regardless of how large the requested file is.

What You Need Before Starting

The fsutil utility is a powerful administrative tool built deeply into the Windows operating system. Because it has the capability to modify file system behaviour at a low level, it must be executed with administrative privileges. Ensure you are logged into a Windows account with administrator rights before proceeding.

Opening the Command Prompt as Administrator

You cannot use standard PowerShell or a regular Command Prompt window for this task.

  1. Click the Windows 11 Start Menu.
  2. Type cmd into the search bar.
  3. On the right side of the search menu, click Run as administrator.
  4. Click Yes when the User Account Control prompt asks for permission.

Creating a Dummy File of an Exact Size

The syntax for generating a dummy file requires three arguments: the command (file createnew), the destination path including the file name, and the desired file size in bytes.

Calculating the byte size is the only slightly complex step. For example:

  • 1 Megabyte (MB) = 1048576 bytes
  • 1 Gigabyte (GB) = 1073741824 bytes

To create a file named testfile.txt on the root of your C: drive with an exact size of 1GB, you would use the following command:

fsutil file createnew C:\testfile.txt 1073741824

Press Enter. The command prompt will immediately return the message File C:\testfile.txt is created.

If you navigate to your C: drive in File Explorer, you will see the newly created text file occupying exactly 1GB of space. Note that while it has a .txt extension, the file contains absolutely no usable data and cannot be read as a normal document.

Creating Multiple Files for Network Testing

If you are testing how an application handles many small files versus one large file, you can easily alter the byte count. For example, to create a smaller 10MB test file on your desktop, you would calculate 10MB in bytes (10485760) and run:

fsutil file createnew "%userprofile%\Desktop\smalltest.dat" 10485760

You can use any file extension you prefer (.dat, .zip, .mp4, or no extension at all), as the file system treats the allocated space exactly the same regardless of the naming convention.

Safely Removing Dummy Files

Because dummy files generated by fsutil are standard files, they require no special commands to delete. When your testing is complete, simply right-click the file in Windows Explorer and select the Trash icon, or highlight it and press the Delete key to instantly reclaim your storage space.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.