How To: Create a new file of a specific size


This is Syed Aslam Basha here from Relationship experience division (RXD) team.

For one of my application testing I required files of specific different size starting from 1 MB to 1.5 TB. Using fsutil you can easily create a new file of a specific size as shown below:

Syntax:

fsutil file createnew <path with name of file> <size in bytes>

 

For example the command to create one GB file is:

fsutil file createnew d:\OneGB.txt 1073741824

 

- Syed Aslam Basha (syedab@microsoft.com)

Relationship experience division (RXD) Team

Test Lead

---------------------------------------------------------

Please leave a comment if the blog post has helped you.

Skip to main content