Create a File in Specific Size – For Testing

For the upload test in SharePoint, I had to create files of a specific size, 10 MB, 20 MB, 30 MB, 40 MB, etc. I figured out an excellent command line tool to create files in a specific size: FSUTIL

fsutil file createnew c:\test.doc 10485760

Provide the size in bytes. The above command will create a 10 MB file.

Create a File in Specific Size for Testing

PowerShell to Create a File of Specific Size

The same can be achieved with PowerShell too:

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

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published. Required fields are marked *