How to use the fsutil file createnew command in Windows
Jul 30, 2025 am 02:35 AMTo create a new file of a specific size in Windows, use the fsutil file createnew command in an elevated Command Prompt; 2. The syntax is fsutil file createnew <filename> <filesize>, where filename includes the full path and filesize is specified in bytes; 3. Open Command Prompt as Administrator, run the command with the desired file path and size, ensuring the directory exists and the file does not; 4. Verify the created file has the correct size by checking its properties; 5. Remember to convert sizes to bytes (e.g., 1 MB = 1,048,576 bytes) and note that the file contains null bytes, making it suitable for testing disk performance or simulating storage usage but not for security testing, and the command requires administrative privileges to execute successfully.
The fsutil file createnew
command in Windows is a built-in command-line tool that lets you create a new file of a specific size. It's useful for testing disk performance, generating placeholder files, or simulating large data sets without needing third-party tools.

Here’s how to use it effectively.
Basic Syntax
fsutil file createnew <filename> <filesize>
<filename>
: The full path and name of the file you want to create.<filesize>
: The size of the file in bytes (must be a whole number).
?? You need to run Command Prompt as Administrator to use
fsutil
.
Step-by-Step Usage
Open Command Prompt as Administrator
- Press
Win X
and select Command Prompt (Admin) or Windows Terminal (Admin). - Or search for "cmd", right-click, and choose Run as administrator.
- Press
Run the createnew Command Example: Create a 100 MB file on your desktop
fsutil file createnew C:\Users\YourName\Desktop\testfile.txt 104857600
100 MB = 100 × 1024 × 1024 = 104,857,600 bytes
? The file will be created with all zeros (null bytes).
Verify the File
- Navigate to the location (e.g., your desktop).
- Check the file properties — it should be exactly the size you specified.
Tips and Notes
File size must be in bytes
You can’t use "KB", "MB", or "GB" directly. Convert first:- 1 KB = 1,024 bytes
- 1 MB = 1,048,576 bytes
- 1 GB = 1,073,741,824 bytes
Use a calculator or quick PowerShell command to convert:
100MB # In PowerShell: returns 104857600
File must not already exist
fsutil
won’t overwrite or modify an existing file. You’ll get an error like "file already exists."Useful for testing
Great for:- Testing backup software speed
- Simulating disk usage
- Checking transfer rates
No content — just size
The file is filled with zeros. It’s not random data, so don’t use it for security testing.
Common Examples
# Create a 1 KB file fsutil file createnew D:\temp\small.txt 1024 # Create a 10 MB file fsutil file createnew C:\data\largefile.dat 10485760 # Create a 1 GB file fsutil file createnew E:\dummy.iso 1073741824
Troubleshooting
- "Access is denied" → Run CMD as administrator.
- "The system cannot find the path specified" → Double-check the directory exists.
- "Parameter is incorrect" → Make sure the size is a valid positive integer.
Basically, fsutil file createnew
is a fast, no-frills way to generate files of exact sizes. Just remember the byte conversion and admin rights — and you're good to go.
The above is the detailed content of How to use the fsutil file createnew command in Windows. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Best Online PHP Editor: Create Files Quickly In the modern software development world, with the rise of cloud computing and remote working, more and more developers are turning to online code editors for coding work. Especially for PHP developers, it is particularly important to find a powerful, convenient and fast online PHP editor. This article will introduce the best online PHP editor and provide specific code examples to help readers quickly understand its functions and usage. Best Online PHP Editor: PHPFiddlePH

PHP is a widely used server-side scripting language that is widely used to develop web applications. When developing web applications, we need to frequently perform file operations, such as creating, reading, and editing files. This article will introduce the use of file creation functions in PHP. There are two commonly used functions for creating files in PHP, namely fopen() and file_put_contents(). fopen() function The function of fopen() function is to open the file. If the file exists, open the file.

In the process of testing the hard disk or network, you need to find some large-capacity software for application testing. Now downloading or re-searching for the test files is a troublesome Linux boot disk creation tool, so I found two related commands. Linux generates .o files to solve the dilemma encountered at work. Windows uses the fsutil command. Windows usually comes with this command. You can use it directly; right-click to run the command prompt command as an administrator. The format of the command is: fsutilfilecreatenew new file Example of file size: Create a file named imwghcom.zip in the root directory of drive D with a size of 1MB fsutilfilecreatene

Detailed explanation of the creation methods and steps of JSP files 1. Preparation work Before creating a JSP file, you need to ensure that the following software has been installed: Java Development Kit (JDK) Apache Tomcat server text editor (such as Notepad, Notepad++ or SublimeText) 2. Create a JSP file. Open a text editor and create a new file. Save the file as a .jsp, such as index.jsp. Enter the following code into the file:

Common time attributes in Linux file systems include access time (atime), modification time (mtime), and change time (ctime). These time attributes record different operation times of files or directories, and are very important for file system management and tracking. The following will introduce these three time attributes one by one, with corresponding code examples. Access time (atime) Access time refers to the last time a file or directory was accessed or executed. When the file is read, executed or viewed, the access time is updated.

Creating a file in C++ requires the following steps: Include the fstream header file. Create an ofstream object and associate it with the file to be created. Open the file using the open() method (using ios::out mode). use

TocreateanewfileofaspecificsizeinWindows,usethefsutilfilecreatenewcommandinanelevatedCommandPrompt;2.Thesyntaxisfsutilfilecreatenew,wherefilenameincludesthefullpathandfilesizeisspecifiedinbytes;3.OpenCommandPromptasAdministrator,runthecommandwiththed

UsefsutilfsinfontfsinfoC:tocheckNTFSvolumedetailslikeserialnumberandclustersize.2.GetfiledetailsbyIDwithfsutilfilequeryfilenamebyidorqueryfileid,requiringadminrights.3.CreatehardlinksviafsutilhardlinkcreateC:\link.txtC:\original.txttosharefiledata.4.
