4 ways to create random dummy files with a specific size in Windows

While most regular users might have issues understanding the need to create random dummy files of a specific size, geeks, software developers, and power users know why such files can come in handy sometimes. You can use dummy files to figure out if there are any bad sectors on your hard drive, to test network speed, or to ensure that files on your computer or device are deleted beyond recovery. Regardless of your reasons, here are four ways to create such files in any modern version of Windows:

Contents

  1. 1. Create a dummy file with the fsutil command
  2. 2. Create a random dummy file with Dummy File Creator
  3. 3. Create a random dummy file with Disk Tools
  4. 4. Create a random dummy file with PowerShell
  5. Which method do you find easiest?

1. Create a dummy file with the fsutil command

All Windows versions since Vista include an executable named fsutil.exe. In Windows 10, you can find it in the "C:\Windows\System32" folder.

4 ways to create random dummy files with a specific size in Windows

The folder containing the fsutil executable

Fsutil.exe is a powerful tool for managing partitions and volumes. Among many other things, you can also use it to quickly create dummy files of any size from the Command Prompt.

There are a lot of ways to launch the Command Prompt, but we prefer to enter "cmd" in our taskbar's search field, and then to click or tap on Command Prompt. If you intend to create random dummy files in a protected system folder (like your C: drive), press "Run as administrator" instead.

4 ways to create random dummy files with a specific size in Windows

Open Command Prompt from your taskbar

Once the Command Prompt is open, type in fsutil and hit Enter to see a list of commands supported by this tool. There are many parameters that you can use. 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.

4 ways to create random dummy files with a specific size in Windows

The list of commands supported by fsutil

There are two commands you can enter in the Command Prompt to create a dummy file:

  • fsutil file createnew filename size
  • fsutil file createnew pathfilename size

Replace filename with the name you want for the dummy file. You can choose to add an 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. 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. We first created a file called myfile.exe with a size of 10MB or 10485760 bytes. To create it, we entered the following command: fsutil file createnew myfile.exe 10485760

4 ways to create random dummy files with a specific size in Windows

Creating a file using the first command

As seen above, if you use the first command and do not specify a path, the file is created in your user profile folder. In our case, it was stored at C:UsersDiana Ann Roe. We then created another 2MB file, this time using a specific path and no extension. We entered: fsutil file createnew D:myfile 2097152

4 ways to create random dummy files with a specific size in Windows

Creating a file using the second command

One aspect to note is that the files created with fsutil.exe are empty. There's no content inside.

2. Create a random dummy file with Dummy File Creator

If you want dummy files with random content, or if you are uncomfortable with the Command Prompt, then you should consider using third-party apps. A free and easy to use tool is the Dummy File Creator.

You can choose between the installer and an archive. We 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 returns an error when it tries to create your files.

4 ways to create random dummy files with a specific size in Windows

Run Dummy.exe to start creating dummy files

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.

4 ways to create random dummy files with a specific size in Windows

Customize your dummy file(s) and press Create

A progress bar keeps you updated while your file is being created.

4 ways to create random dummy files with a specific size in Windows

Follow the creation of your dummy file

As soon as the program finishes writing, you get a notification informing you that your file was created.

4 ways to create random dummy files with a specific size in Windows

A pop-up lets you know the file was created

This tool is obviously easier to use than fsutil.exe, and it also comes with several advantages, like creating more files at the same time and the option to add random file content.

3. Create a random dummy file 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 and run CubicDesign_tools.exe. When you try to access it, Windows Defender SmartScreen pops up, telling you that it prevented an unrecognized app from starting. Click or tap on More info and choose Run anyway. Click or tap Install and wait for the app to unpack. Once the extraction is complete, File Explorer takes you to the newly created folder called Tahionic tools package. Out of all the files included in this suite, open Disk Tools.exe, from the System & security folder.

4 ways to create random dummy files with a specific size in Windows

Access Disk Tools.exe

Also in dire need of a makeover, the Disk Tools opens at the File generator tab, which is the one we need to create dummy files.

4 ways to create random dummy files with a specific size in Windows

Use the File generator tab to create dummy files

The four sections in this tab help you customize your dummy file(s):

  • Number of files - Set the number of generated files.
  • File size - Set the file size or choose one of the suggested sizes on the right.
  • File name - Set the file name and location. Select Pattern to enter a custom name (and, optionally, an extension)
  • File content - Set the file content. Select "Fill the files with this content" to customize the text in your file and to unlock the option to "Make file unique," which comes in handy when you create multiple files, and you don't want generated files with identical content.

When you are done setting things up, click or tap Create. A beep signals that the dummy file was created, and, at the bottom of the tab, the program also lets you know the time it took to generate the file. It is possible for the program to beep and announce it has generated the dummy file, but the file is not at the specified location. This can happen if you are running Disk Tools without administrator permissions and you are trying to create files on your system drive (C:). To create files anywhere on your Windows computer or device, make sure to open the program as administrator.

What we liked about this app is that, although it looks a bit cluttered, it provides excellent configuration options, and you have a say when it comes to file content. The option to generate unique files is also a nice touch.

4. Create a random dummy file with PowerShell

You can also create a dummy file using PowerShell from Windows. While we detailed all the ways you can open this app in a previous tutorial, we find it easiest to type in "powershell" in the taskbar's search field, and then to click or tap on Windows PowerShell. 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 when you open it.

4 ways to create random dummy files with a specific size in Windows

Open PowerShell from your taskbar

The PowerShell app launches, waiting for you to type commands and run them.

4 ways to create random dummy files with a specific size in Windows

The PowerShell console opens

To create a dummy file, you need to enter the following one-line command:

$out = new-object byte[] size; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes('pathfilename', $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 you prefer. 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, as this has no impact on the process. Let's illustrate this with an example to make it clearer:

We decided to create a file called mypowerfile.txt with a size of 1MB (or 1048576 bytes) on the D: partition. To create it, we entered the following command: $out = new-object byte[] 1048576; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes('D:mypowerfile.txt', $out)

4 ways to create random dummy files with a specific size in Windows

Create a dummy file using PowerShell

Although PowerShell does not offer real-time feedback (unless you made an error writing the command), like the other apps we went over, 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.

4 ways to create random dummy files with a specific size in Windows

The 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. We used the same command as above, leaving out the path entirely: $out = new-object byte[] 1048576; (new-object Random).NextBytes($out); [IO.File]::WriteAllBytes('mypowerfile.txt', $out)

4 ways to create random dummy files with a specific size in Windows

Create a dummy file without specifying the path

Without a path, the new dummy file is stored by default at C:UsersYourUserNamemypowerfile.exe, as seen below. As opposed to fsutil, PowerShell lets you create dummy files with random content. If you compare two files, created using the same command, you can see that they have different content.

4 ways to create random dummy files with a specific size in Windows

Files without a specified path are created in your user profile folder

Out of all the options above, 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 might 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:

$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"}

Which method do you find easiest?

We searched the pits of the internet and downloaded one too many suspicious files in order to bring you this tutorial. Before you close it, please let us know which of these methods do you prefer? Also, if you know other ways to create dummy files in Windows, don't hesitate to share them in the comments below and we promise to check them out.

Sign up and earn $1000 a day ⋙

How To Access An Android Phone With A Broken Screen

How To Access An Android Phone With A Broken Screen

Dealing with a broken screen on your Android phone is a hassle. Although phone screens are pretty tough, one nasty drop can shatter them completely. Given that most people have a lot of irreplaceable content on their phones, it is

Find out how to find friends and family using online services

Find out how to find friends and family using online services

In today's world, where information is more accessible than ever before, finding long-lost friends or relatives has become much easier. Online services for finding people provide convenient and effective tools that allow you to restore lost connections.

IObit Uninstaller 13 - One Click to Uninstall All Unwanted Programs

IObit Uninstaller 13 - One Click to Uninstall  All Unwanted Programs

In the busy software utilities industry, the available uninstallation tools are often overshadowed by more glamorous alternatives. Nonetheless, an excellent way of removing programs on a PC is vital for optimal system performance and the elimination of unwanted applications.

Instructions for creating Moon phase trend

Instructions for creating Moon phase trend

Instructions for creating a Moon phase trend. The Moon trend is extremely popular on TikTok, creating an unprecedented fever. Through Moon phase will help you know the date

How to edit videos posted on YouTube without losing views

How to edit videos posted on YouTube without losing views

How to edit videos posted on YouTube without losing views, You forgot to blur sensitive content in videos posted on YouTube. Don't worry, here's how to adjust it

How to enable dark mode on TikTok

How to enable dark mode on TikTok

How to turn on dark mode on TikTok, How to turn on dark mode on TikTok is not difficult. The article will guide you in detail how to change the TikTok interface to black on Samsung

Shirt size chart - How to choose the most accurate shirt size

Shirt size chart - How to choose the most accurate shirt size

Shirt size chart - How to choose the most accurate shirt size, What is the shirt size chart? Shirt size means only the size and size of the shirt or pants. Shirt size varies according to direction

Instructions for drawing prizes to receive Lucky Money on ZaloPay

Instructions for drawing prizes to receive Lucky Money on ZaloPay

Instructions for drawing prizes to receive Lucky Money on ZaloPay. Recently, Zalo has launched the program "Amazing lucky money, Happy Spring Luck" taking place from January 29, 2021 to

How to view and recover Microsoft Outlook password

How to view and recover Microsoft Outlook password

How to view and recover Microsoft Outlook password, How to view Outlook password on computer is not difficult. This article will guide you how to view and recover Outlook password

Instructions for creating and searching for draft posts on Facebook

Instructions for creating and searching for draft posts on Facebook

Instructions for creating and searching for draft articles on Facebook. Currently, we can save articles that we have created but have not yet posted on Facebook. Here, WebTech360 invites

How to set up LibreOffice Writer to work like Microsoft Word

How to set up LibreOffice Writer to work like Microsoft Word

How to set up LibreOffice Writer to work like Microsoft Word, If you're planning to switch from Microsoft Word to LibreOffice Writer but want a similar experience

Instructions for turning off saving videos on TikTok are extremely simple

Instructions for turning off saving videos on TikTok are extremely simple

Instructions for turning off saving videos on TikTok are extremely simple, to help people block others from downloading and saving their videos simply and easily. So today, WebTech360

Instructions for creating genealogical and organizational charts on Google Sheets

Instructions for creating genealogical and organizational charts on Google Sheets

Instructions for creating genealogical charts and organizing them on Google Sheets. Google Sheets is an online office application that helps us easily edit online spreadsheets,

How to import and manage multiple email accounts in Gmail

How to import and manage multiple email accounts in Gmail

How to import and manage multiple email accounts in Gmail, Want to manage all emails in Gmail? Let's learn how to manage and add multiple accounts with WebTech360

Instructions for using Photoshop filters for beginners

Instructions for using Photoshop filters for beginners

Instructions for using Photoshop filters for beginners, Each filter in Photoshop has its own algorithm and uses. Below are instructions for using the internal filter

How to create automatic clicks on Macrorify

How to create automatic clicks on Macrorify

How to create automatic clicks on Macrorify, Macrorify helps you create automatic click tasks and detect images. In this article, let's find out how with WebTech360

Instructions for logging out of Instagram account remotely

Instructions for logging out of Instagram account remotely

Instructions for remotely logging out of your Instagram account. If you don't know how to remotely log out of your Instagram account, today WebTech360 would like to introduce

Instructions for remotely logging out of Tik Tok account

Instructions for remotely logging out of Tik Tok account

Instructions for remotely logging out of Tik Tok account. To help people quickly log out of Tik Tok accounts from other devices, today WebTech360

Instructions for blurring photos on B612

Instructions for blurring photos on B612

Instructions for blurring photos on B612. Recently, the B612 application has updated the image blur effect. Next, WebTech360 will introduce the article Instructions for blurring photos

How to fix the error of printing blank pages in Microsoft Excel

How to fix the error of printing blank pages in Microsoft Excel

How to fix the error of printing blank pages in Microsoft Excel. Why do some Excel documents not display data or contain blank pages when printed? Below are the reasons