How is the Best and fastest way to do it?
+2
A:
I found this Page, I try it and work great.
To create One File use
fsutil file createnew filename filesize
To create a lote of Files use
or /L %i in (1,1,25000) do fsutil file createnew A%i.tmp 12288
will create 25,000 files of 12288 bytes (12KB) named A1.tmp, A2.tmp, A3,tmp…
Jedi Master Spooky
2009-04-30 17:02:46
+1
A:
PowerShell:
$f = new-object System.IO.FileStream c:\temp\test.dat, Create, ReadWrite
$f.SetLength(42MB)
$f.Close()
This will create a file c:\temp\test.dat that consists of 42MB of nullbytes. You can of course just give byte count instead as well. (42MB = 42 * 1048576 for PowerShell)
mihi
2009-04-30 17:56:04
A:
c:>fsutil file createnew /? Usage : fsutil file createnew Eg : fsutil file createnew C:\testfile.txt 1000
CB
2010-01-19 01:39:42