Create an Empty File Using Command Line

On occasion I need to create large to mammoth size files for testing purposes.  Windows command line makes this possible and quickly.

  • Open a command prompt with elevated permissions – Run As Administrator
  • Type at the prompt: fsutil file createnew <path to file> <file size>
  • Example: fsutil file createnew c:\test.txt 1073741824

The file size should be entered in Bytes.  I use whatsabyte.com

Now you have an empty file that you can use for testing purposes, or to ensure reserved space on a drive should it ever be required.