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

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

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.

Learn more from "How do I create a sparse file of a specific size in Windows XP and greater?"

TAGS: Windows 8
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish