Creating a Dummy File(s)

Sometimes you need to have several files on a system for testing purposes.
Like I do, when testing snapshots within Hyper-V.

 

Hereby a way of doing

If you need to create a file (or several files) of a certain size without having any valuable contents. You can use the fsutil command.

Example 1: Create 1 file of 1MB

fsutil file createnew c:\temp\1mbfile.txt 1048576

Example 2: Create 1 file of 1GB

fsutil file createnew c:\temp\1Gbfile.txt 1073741824

Example 3: Create 100 files of 1MB

for /L %I in (1,1,100) do fsutil file createnew c:\temp\%I-1MB_file.txt 1048576

Syntax

fsutil file createnew
Usage : fsutil file createnew
   Eg : fsutil file createnew C:\testfile.txt 1000

Additional information