Download Windows Speedup Tool to fix errors and make PC run faster
This post will show you how to generate a test file of any size using Command Prompt in Windows 10. You can generate 100 MB, 1 GB, 1 TB, or any other size dummy file within a few seconds. While there are several dummy file generator software available, there is a built-in tool of Windows 11/10 known as Fsutil.exe that you can also use.
The output file doesn’t contain any dummy or sample data in it. But it is good for various testing purposes. Apart from that, you can also set file type (say TXT, PDF, etc.) or file extension to create your test file.
How to create large size dummy files in Windows 11/10
For all those users, who need to download large sample files for testing purposes from time to time, this native feature of Windows 11/10 is surely very useful. Instead of searching the internet to get sample files every time, you can create them by yourself without using any third-party tool.
First of all, open or launch Command Prompt, and then you need to enter a command with the following items:
fsutil file createnew <file name/path/extension> <size of file in bytes>
Let’s say you want to create a 100 MB text file on the desktop, with name sample, then the command would be:
fsutil file createnew "C:\Users\<username>\Desktop\sample.txt" 104857600
Replace username with the actual name of your PC in the command.
Execute the command and a dummy file of 100 MB size will be created quickly.
Similarly, if you want to create a 1 GB test file, then run the above command by entering file size as 1073741824.
You can use some unit converter to convert MB to bytes or GB to bytes to get the exact number for your test file.
Hope this post is helpful.
How do I view large files?
To view large files, you can use third-party tools including Notepad++, Sumatra PDF, nomacs, and VLC. These applications allow you to view files of different file types that are large in size. For example, to view high-definition and 4K quality videos that are large in size, you can use VLC. Similarly, large text files can be viewed in Notepad++.
How do I make a large test file?
These tools can help you make a large test file or fake file having the size in MBs, GBs, etc., quickly and easily. If you want some large test files, these fake file generator tools might be helpful. You can also set file type (say PDF, TXT, etc.) using most of these tools.
Laxman has done Bachelor’s in Computer Science, followed by an MBA. Writing about Windows OS and the free software and services that are available for the Windows operating system is what excites him.
Creating big test files is sometimes needed for checking how fast files can move, testing how much stuff you can store, or seeing how well apps work with big files. This guide will show you different ways to make big test files in Windows 11 or Windows 10. We’ll look at using things already in Windows like FSUTIL and the Command Prompt, PowerShell, and some other tools. We’ll also talk about making big files for certain apps, like Word or Excel.
Also see: How to Find Huge Files in Windows 11
Using FSUTIL to create large test files
FSUTIL is a tool for managing files and storage in Windows. It’s really handy and can make empty files, big text files of certain sizes, or even files like Word documents or Excel spreadsheets. Besides making big test files, FSUTIL can do things like check how much free space you have or manage special file points.
To make a big test file with FSUTIL, do this:
- Hit Win + R, type
cmd
, and hit Enter to open Command Prompt. - To make a specific size file, use this command:
fsutil file createnew <filename> <filesize_in_bytes>
For instance, to make a 1GB Word document named “testfile1gb.docx”, type this command:
fsutil file createnew testfile1gb.docx 1073741824
The file will pop up in the Command Prompt’s current spot. You can choose a different place by typing the whole path to where you want it. Making big files might take a bit, depending on how big and your computer’s speed.
Note: You can make a file with any ending. The above example is for a Word doc (.docx). If you want a different kind, like Excel, just change the ending to “.xlsx”. Or drop the ending to make a simple file without one.
But remember, these files might not work right in their apps because they’re filled with blank data and don’t have the right format.
Related problem: File Transfer Speed Very Slow or Drops to Zero in Windows 11
Creating various file sizes
With FSUTIL, you can make any size file by changing the number of bytes. Here’s how to make different sizes:
- For a 100MB file:
fsutil file createnew testfile100mb.dat 104857600
- For a 5TB file:
fsutil file createnew testfile5tb.dat 5497558138880
- For a 1TB file:
fsutil file createnew testfile1tb.dat 1099511627776
You can make specific sizes like 55GB, 101MB, or 90MB by changing the byte number. Just don’t forget, very big files need lots of free space on your hard drive.
Here’s a quick byte guide for common sizes:
- 1 MB = 1,048,576 bytes
- 100 MB = 104,857,600 bytes
- 1 GB = 1,073,741,824 bytes
- 10 GB = 10,737,418,240 bytes
- 100 GB = 107,374,182,400 bytes
- 1 TB = 1,099,511,627,776 bytes
- 10 TB = 10,995,116,277,760 bytes
Use this to quickly change sizes to bytes when making test files with FSUTIL or PowerShell.
Useful tip: How to Batch Rename Files in Windows 11
Creating large text files
Making big text files is good for testing apps that work with text. Here’s how to make a big text file with FSUTIL and Command Prompt:
- First, make a small text file with some text. For example, make a file named sample.txt with this text:
This is a sample text file for testing purposes.
- Then, make an empty text file called large_text_file.txt.
- Now, repeat copying the sample text into the big file like this:
for /L %i in (1, 1, <number_of_iterations>) do type sample.txt >> large_text_file.txt
- Change
<number_of_iterations>
to how many times you want to copy the text. This depends on the sample file size and how big you want the large text file.
For example, to make a 1GB text file from a 50-byte sample, you’d copy it about 21,474,836 times:
for /L %i in (1, 1, 21474836) do type sample.txt >> large_text_file.txt
This might take a while, especially for very big files, depending on your computer’s speed.
Linked issue: Batch (.BAT) Files Not Running in Windows 11/10
Creating large files for specific applications
For big test files like Word docs, Excel spreadsheets, or MP4 videos, you can use other tools or make up data. Here are some ideas:
- To make a big Word doc, you could keep pasting dummy text until it’s big enough. Or, use a text generator like Lorem Ipsum and save it as a Word doc.
- For a big Excel file, fill cells with random data or use Excel functions. You could use
RAND()
for random numbers in cells, orREPT()
to repeat text. - For a big MP4 video, you could use video editing software to make or repeat content until it’s big enough. Or, download big video files from free stock footage sites.
Recommended resource: How to Convert CSV or TXT to Excel in Windows 11
Creating large test files with PowerShell
Windows PowerShell is another tool for making big test files. It can make files of many sizes and types.
Here’s how to make a big file with PowerShell:
- Hit Win + X and click “Windows PowerShell” to open it.
- To make a specific size file, use this command:
$f = [System.IO.File]::Create("<filename>") $f.SetLength(<filesize_in_bytes>) $f.Close()
Change
<filename>
to your file’s name, and<filesize_in_bytes>
to how big you want it in bytes.
For a 1GB file named testfile1gb.dat
, do this:
$f = [System.IO.File]::Create("testfile1gb.dat") $f.SetLength(1073741824) $f.Close()
The file will appear where you’re working in PowerShell. You can pick a different spot by typing the full path. Making big files can take a bit, depending on the size and your computer’s speed.
Suggested guide: How to Compare Two Folders in Windows 11
You can also use PowerShell to make big text files by adding text over and over until it’s the size you want. Here’s an example:
- First, make a small text file with some text, like “sample.txt” with:
This is a sample text file for testing purposes. - Then, in PowerShell, use commands to make a big text file:
$sampleText = Get-Content "<path_to_sample.txt>" $largeTextFile = "<path_to_large_text_file.txt>" $desiredFileSize = <desired_filesize_in_bytes> while ((Get-Item -Path $largeTextFile).Length -lt $desiredFileSize) { Add-Content -Path $largeTextFile -Value $sampleText }
Change
to your sample text’s path,
to the big text file’s path, and
to how big you want the text file in bytes.
For a 1GB file from a 50-byte sample, you’d do this:
$sampleText = Get-Content "C:\sample.txt" $largeTextFile = "C:\large_text_file.txt" $desiredFileSize = 1073741824 while ((Get-Item -Path $largeTextFile).Length -lt $desiredFileSize) { Add-Content -Path $largeTextFile -Value $sampleText }
PowerShell is a great option besides FSUTIL and Command Prompt for making big test files in Windows.
Just one more thing
After you’ve finished testing with those large files, make sure to delete them and empty your recycle bin. These large files, even if they are fake in a sense, can still use up a lot of disk space on your computer. If you leave them in your hard drive, you’ll be wasting your storage space for literally nothing.
A filled HDD can also slow down your PC or sometimes cause errors when there is nearly no space left. Not to mention doing too much writing on an SSD can actually reduce its lifespan. Thus, once you’re done with your tests, you should delete those big files. You can always recreate them whenever you need them again.
Иногда бывают ситуации, в которых требуется быстро создать один или несколько файлов произвольного размера. Операционная система Windows предлагает для этого несколько различных вариантов.
Создание файла с помощью fsutil
Быстрее и проще всего создать файл с помощью утилиты командной строки fsutil. Для примера откроем консоль (обязательно с правами администратора) и создадим на диске E файл file.txt размером 1ГБ командой:
fsutil file createnew E:\File.txt 1000000000
Таким образом можно создать файл любого размера, причем файл создается практически мгновенно.
Создание файла с помощью PowerShell
То же самое можно сделать с помощью PowerShell, хотя команды будут немного сложнее:
$file = New-Object -TypeName System.IO.FileStream -ArgumentList E:\File.txt,Create,ReadWrite
$file.SetLength(1000Mb)
$file.Close()
Здесь мы сначала создаем объект типа файл, а затем с помощью метода SetLength присваиваем ему необходимый размер. Таким способом также можно мгновенно создать файл любого размера.
Есть и еще один, альтернативный способ создания файла с помощью PowerShell. Если в первом случае мы создавали файл и задавали его размер, то здесь создаем содержимое нужного размера и помещаем это содержимое в указанный файл. Например:
$content = New-Object -TypeName Byte[] -ArgumentList 10Mb
Set-Content -Path E:\File.txt -Value $content -Encoding Byte
При использовании этого метода создание файла занимает некоторое время, зависящее от размера файла. Кроме того, с его помощью невозможно создать файл большого размера. Максимальный размер файла ограничен встроенным значением [int]::MaxValue и при его превышении будет выдана ошибка ″Array dimentions exceeded supported range″.
Все описанные способы создают пустые файлы (точнее файлы, заполненные символом NUL). Если надо создать файл заданного размера и заполнить его каким либо произвольным содержимым, то можно немного изменить предыдущий способ и воспользоваться такими командами:
$array = New-Object -TypeName Byte[] -ArgumentList 10Mb
$obj = New-Object -TypeName System.Random
$obj.NextBytes($array)
Set-Content -Path E:\File.txt -Value $array -Encoding Byte
Ну и для генерации большого количества файлов (напр. 1000) можно воспользоваться таким скриптом:
$array = New-Object -TypeName Byte[] -ArgumentList 10Mb
$obj = New-Object -TypeName System.Random
$obj.NextBytes($array)
for ($i=1; $i -le 1000; $i++) {
Set-Content -Path E:\File.txt$i -Value $array -Encoding Byte
}
Работает небыстро, но для ускорения можно запустить скрипт в несколько потоков.
В повседневной работе по той или иной причине системному администратору периодически приходится создавать файлы определенного размера. Обычно необходимость в создании файла определенного размера возникает при тестировании различных подсистем, например вы хотите протестировать работу дисковых квот или фильтров электронной почты. Самый простой способ создать файл определенного размера – воспользоваться Windows-утилитой fsutil.exe. Эта утилита командной строки, которую можно использовать для управления дисковыми квотами, различными манипуляциями с объектами файловой системы, а также для выполнения различных манипуляций с файлами.
Например, вы тестируете работу модуля статистики вашего почтового сервера, и вам нужно создать файл размером 10 Мб и отправить его по почте. Наберите в командной строке с повышенными привилегиями следующую команду:
fsutil file createnew C:\10mb-file.txt 10000000
Эта команда создаст в корне диска C:\ новый файл с именем ’10mb-file.txt’, размером 10000000 байт (10 Мб).
📝🔥 How to Quickly Create a Large File on a Windows System: Easy Solutions! 💻🔨
If you’re looking to create a large file on your Windows system, whether it’s for testing purposes or other reasons, you’ve come to the right place! In this blog post, we’ll explore some common issues, provide easy solutions, and empower you to create large files like a pro. Let’s dive in! 💪
The Challenge: Creating a 5GB File on Windows
Our reader wants to create a sizable 5GB file on their Windows system. While they prefer a built-in command or a short batch file, they are open to using applications if needed. Let’s discuss the easiest and most efficient solutions to achieve this goal.
Solution 1: PowerShell to the Rescue!
PowerShell, the command-line shell and scripting language developed by Microsoft, offers a quick and seamless way to create large files on a Windows system. Here’s how to do it:
-
Open PowerShell by pressing
Windows key + X
and selecting «Windows PowerShell» from the menu. -
In the PowerShell window, type the following command:
fsutil file createnew C:\path\to\your\file.txt 5000000000
This command uses the fsutil
utility to create a new file (file.txt
) in the specified path with a size of 5GB (5000000000 bytes). Make sure to replace C:\path\to\your\file.txt
with the actual path where you want to create the file.
And voila! You now have a 5GB file on your Windows system, ready to be used.
Solution 2: Third-Party Applications
If you prefer a more user-friendly approach, there are several third-party applications available that can quickly create large files. Here are a few popular choices:
-
Dummy File Creator: A lightweight and straightforward application that allows you to create files of any size with ease.
-
Sizer: Another handy tool that lets you create large files effortlessly.
-
Large Text File Viewer: Although primarily designed to view large text files, this application also provides an option to create large files.
Feel free to explore these options and choose the one that best suits your needs.
Engage with Us!
We hope this guide has helped you quickly create large files on your Windows system. If you have any questions, suggestions, or other tips you’d like to share, we’d love to hear from you! Leave a comment below and let’s keep the conversation going. 👇😊
#Conclusion
Creating large files on a Windows system doesn’t have to be a daunting task. With PowerShell or the right third-party application, you can accomplish this quickly and efficiently. Whether you’re in the tech industry or just curious about exploring new possibilities, try out these solutions and let us know about your experience. Happy file creating! 🚀💾