How to make a file of an size fast - fsutil file createnew test 1048576
https://stackoverflow.com/questions/982659/quickly-create-large-file-on-a-windows-system
http://technet.microsoft.com/en-us/sysinternals/bb897428.aspx
24 Answers
- 6@ZXX +1 For my purposes I merely needed the file system to see the space as unavailable, but your information is helpful if someone else needs this. Dec 22, 2010 at 13:50
- 24
- 10"fsutil sparse setflag temp.txt" sets the sparse flag, making it a sparse file. "fsutil sparse setrange temp.txt 0 1024" sets the range of sparseness :) May 10, 2014 at 21:53
- 3@ZXX
fsutil file createnew
does NOT create sparse files:c:\>fsutil file createnew test.txt 0x100000
File c:\test.txt is created
c:\>fsutil sparse queryflag test.txt
This file is NOT set as sparse
Oct 20, 2017 at 6:29 - 4This might not technically be a sparse file, but creating a 500GB file takes less than a second (even on a somewhat faulty hard disk). If you want to actually trigger 500GB of disk IO (like I do), this command isn't it. Oct 5, 2018 at 7:43