In the same vein as Quickly create a large file on a Linux system, I\'d like to quickly create a large file on a Windows system. By large I\'m thinking 5 GB.
I was searching for a way to generate large files with data, not just sparse file. Came across the below technique:
If you want to create a file with real data then you can use the below command line script.
echo "This is just a sample line appended to create a big file.. " > dummy.txt for /L %i in (1,1,14) do type dummy.txt >> dummy.txt
(Run the above two commands one after another or you can add them to a batch file.)
The above commands create a 1 MB file dummy.txt within few seconds...