Create a File in Specific Size – For Testing

For upload test in SharePoint, I had to create files of specific size, 10 MB, 20 MB, 30 MB, 40 MB, etc. Figured out a nice command line tool to create files in specific size. FSUTIL

fsutil file createnew c:\test.doc 10485760

This will create 10 MB file.

Create a File in Specific Size for Testing

The same can be achieved with PowerShell too:

$FilePath = "C:\Test.doc"
$File = [io.file]::Create($FilePath)

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply