JSI Tip 7400. How do I create a sparse file of a specific size in Windows XP and greater?

Jerold Schulman

November 2, 2003

1 Min Read
ITPro Today logo in a gray background | ITPro Today

If you have the need to create a file of a specific size, and don't care about the contents, Windows XP, and greater (Windows NT 5.1+), has the fsutil.exe command-line tool.

The syntax for using fsutil.exe to create a new file is:

fsutil file createnew FileName Size

where FileName is the name of the file, such as test.txt, or c:foldertest.doc, and Size is the size of the file in bytes.

NOTE: This is useful when an old install program fails because too much freespace causes its' freespace calculation to overflow.



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like