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:\folder\test.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.