How to create a file of a certain size

In this example I will show you how to create a file of a fixed size. This can be useful if you require files of fixed sizes for testing purposes.

To do this we will use fsutil, which is a command line File System Utility provided with Windows XP and later.

We will be using fsutil file to perform the action of creating a new file.

The syntax is

fsutil file createnew < file name > < file size in bytes >

For example

fsutil file createnew c:\onemegabytefile.txt 1000000

This tool has come in very handy when testing the upload of very large files.


No comments yet.

Add Yours

  • Author Avatar


Comment Arrow

About Author


Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning hands down.