Subscribe to Windows IT Pro
November 28, 2003 12:00 AM

How can I create a file of a certain size in Windows XP and later?

Windows IT Pro
InstantDoc ID #40935
Rating: (53)

A. If you need to create a file of a certain size and the file contents don't matter, you can use the Fsutil command as follows:

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

For example,

fsutil file createnew d:\temp\1mbfile.txt 1000000

creates a 1MB file named 1mbfile.txt in the d:\temp folder. I've successfully used this command to create a very large file to reduce the amount of free space when I was using a buggy installation program that couldn't address too much free space.

Related Content:

ARTICLE TOOLS

Comments
  • Chris
    5 years ago
    Feb 16, 2007

    Good tip - Thanks

  • Anonymous User
    7 years ago
    Mar 01, 2005

    shuki shuki!

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.