While many everyday users might not immediately see the need to create random dummy files of a specific size, tech enthusiasts, software developers, and power users understand how valuable these files can sometimes be. Dummy files are useful for testing purposes, such as identifying bad sectors on a hard drive, measuring network speed, or ensuring that files are securely erased beyond recovery. Whatever your reasons, here are a couple of methods to create dummy files in both Windows 10 and Windows 11:
The folder containing the fsutil executable
Fsutil.exe is a powerful tool for managing partitions and volumes, and it can also be used to create dummy files of any size from the Command Prompt. If you want to launch the Command Prompt, search for cmd in the taskbar’s search field, and then click or tap Command Prompt. If you need to create files in a protected folder, such as the system drive (C:), choose to Run as administrator instead so that the Command Prompt has the required privileges to create such files for you. This is what it looks like in Windows 10:
Open Command Prompt in Windows 10
And this is what launching Command Prompt from the taskbar looks like in Windows 11:
Open Command Prompt in Windows 11
Once the Command Prompt is open on your Windows 10 or Windows 11 computer, type the command as is:
The list of commands supported by fsutil
TIP: This only gives you a taste of what fsutil.exe can do. You can find complete information about its capabilities in its official documentation on TechNet.
There are two commands you can enter in the Command Prompt to create a dummy file:
Creating a file using the first command
As seen above, if you use the first command and don’t specify a path, the file is created in your user profile folder. In my case, it was stored in:
Creating a file using the second command
IMPORTANT: One aspect to note is that the files created with fsutil.exe are empty. There’s no content inside.
Open PowerShell in Windows 10
And this is how to open PowerShell in Windows 11:
Open PowerShell in Windows 11
Then, you need to enter the following one-line command to create a dummy file in PowerShell:
Create a dummy file using PowerShell
Although PowerShell doesn’t offer real-time feedback (unless you’ve made an error writing the command), you can tell it is done creating the file when it is ready for another command. If you go to the specified location, you can see that the dummy file has been created.
A dummy file created with PowerShell
Similar to using fsutil in the Command Prompt, you can leave out the path and the file is created in your user profile folder. I used the same command as above, leaving out the path entirely:
Create a dummy file without specifying the path
Without a path, the new dummy file is stored by default at:
Files without a specified path are created in your user profile folder
IMPORTANT: As opposed to fsutil, which creates empty files, PowerShell lets you create fake files with randomly generated content. If you compare two files, created using the same command, you can see that they have different content.
Out of all the options in this article, PowerShell is the most complicated, both because of the complexity of its commands and the absence of confirmation when your dummy file is generated. However, power users may prefer it to the other options.
TIP: When using the PowerShell commands above, you can add a parameter that makes the console provide feedback, while creating dummy files. However, keep in mind that this makes the command unnecessarily long, as you have to insert the following one-liner:
Run Dummy.exe to start creating dummy files in Windows
While in need of a makeover, the interface of this program is straightforward. The Mode section lets you choose whether you want to generate one file or more. Use the Browse button to get to the location where you want to create the file(s) and type in the name (and extension, if you want one). Next, specify the File Size and check the “Random file content (non-compressible)” box if you want your file(s) to have random content. Then, click or tap Create.
Customize your dummy file(s) and press Create
A progress bar keeps you updated while your file is being created. As soon as the program finishes writing, you get a notification informing you that your file was created.
A pop-up lets you know the file was created
This tool is obviously easier to use than CMD or PowerShell to create empty files, and it also comes with several advantages, like creating more files at the same time and the option to add random file content.
1. How to use CMD to create a file with dummy content (fsutil command)
All Windows versions since Vista include an executable named fsutil.exe. In both Windows 10 and Windows 11, you can find it in:C:\Windows\System32



fsutil
Hit Enter and you get to see a list of commands supported by this tool. As shown in the screenshot below, there are many parameters that you can use.

fsutil file createnew filename size
or
fsutil file createnew path\filename size
Replace filename with the name you want for the dummy file. You can choose to add a file extension or not, as this does not affect the process. Replace size with the size you want your dummy file to have. The size is measured in bytes and it might be easier to use an online converter to help you define the size you prefer.
The difference between the two commands is that the second one allows you to specify exactly where your file is stored, by replacing path with a location of your choice on your device.
Now that we got over the theory part, let’s see how this works in practice. I first created a file called myfile.exe with a size of 10 MB or 10485760 bytes. To create it, I entered the following command:
fsutil file createnew myfile.exe 10485760

C:\Users\test
I then created another 2 MB file, this time using a specific path and no extension. I entered:
fsutil file createnew D:\myfile 2097152

2. How to use PowerShell to create a dummy file in Windows
You can also create a dummy file using PowerShell in both Windows 10 and Windows 11. There are many ways to launch this app, yet one I find easiest is to type powershell in the taskbar’s search field, and then click or tap the Windows PowerShell result. However, if you plan to create random dummy files on your system drive (C:), make sure to select “Run as Administrator” from the options on the right. This is what it looks like in Windows 10:

$out = new-object byte[] size; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes('path\filename', $out)
Replace size with the size your dummy file should have, in bytes. You can use an online converter if you need help defining the size, especially if you want Windows to create a large file with random data. Replace path with the location where you want to create the dummy file. Replace filename with the name you want for the dummy file. Add a file extension if you want to. Let’s illustrate this with an example to make it clearer:
I decided to create a file called mypowerfile.txt with a size of 1 MB (or 1048576 bytes) on the desktop. I entered the following command to create it:
$out = new-object byte[] 1048576; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes('C:\Users\test\Desktop\mypowerfile.txt', $out)


$out = new-object byte[] 1048576; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes('mypowerfile.txt', $out)

C:\Users\YourUserName\mypowerfile.exe

$out = new-object byte[] 1048576; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes('mypowerfile.txt', $out); if ($out -ne $null) {Write-Host ("Dummy file successfully created")} else {"Failed to create dummy file"}
3. How to create a random dummy file with a third-party fake file generator
If you want dummy files with random content, or if you are uncomfortable with the Command Prompt, then you should consider using a third-party app such as the Dummy File Creator, which is free and easy to use. When choosing how to download it, I recommend you to 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 (C:), right-click or press-and-hold and select Run as administrator, or the program will return an error when it tries to create your fake files.




Discussion (14)
What I need is a tool which will turn all my jpg files in a download folder to 1 byte files easily. I have thousands of files. I’ve already copied them where they need to be. So this download folder is purely for preventing the download of the same file more than once, and to reduce the storage space to a minimum. It also coincidentally is also a quick reference to any new downloads. The one’s with real file sizes. I’ve looked high and low to find a tool to do this. But until now. No success. Any help would be appreciated.
I’ve developed an online tool that does the job easily. You can give it a try at https://createdummyfiles.com/
Regards
Would love to know more about what exactly goes on when calling “.NextBytes($out)” – is it interpreted as an array of sorts?
Anywho – instead of calculating the size elsewhere, it can be done directly in line, e.g. for a 1gb file: new-object byte[] 1gb
Calculations can be done in line as well, e.g. 5 mg file:
new-object byte[] (5 * 1mb)
There is no need for multiplications in PS for the size… 1MB will be rendered as 1048576 and 5mb as 5242880. You can in fact even write 1.5mb that will become 1572864.
Hey, you guys are always publishing instructions in your excellent articles on how to get someplace? Today you explain how to get to the Cmd prompt.
If you right click on the Start button (lower left Task Bar #1 position) you will find over a dozen different places you can go with a Single click.
Gotta go…………..!
I can’t stand the pace here! If I continue to follow the activity here I won’t have time for anything else.
Maybe later!
Caio………..
The last one is a virus.
What is a virus?
I used the command prompt instructions. This was helpful for testing the file size limits on the mail server. Thanks.
It’s useless because it’s not possibile to create a dummy .exe file……
What about renaming the file and replacing the .txt file extension with .exe?
No, you are a useless dummyphile
Thanks for sharing this tool.
try our Disk Filler Utility. download from https://www.sqamanual.com/home/mainnav/downloads