Generate large files for testing using a VB Script

Posted on 2009-12-18
Last Modified: 2012-05-08
Devoted Code Gurus,
I need to test an application for uploading and downloading files.  Using VB Script or any other Windows Scripting tool I need an application that will build text files as big as I specify (up to 2.5 gigabytes) and as many as I need.  Does anyone have a nice bit of code for accomplishing this?

humble regards,


Question by:tcalbaz
    LVL 81

    Expert Comment

    Hello tcalbaz,

    With dos : fsutil file createnew C:\incredible.hlk 2684354560

    LVL 81

    Accepted Solution

    With VBS :

    Set fso = CreateObject("Scripting.FileSystemObject")
    set shl = createobject("") "fsutil file createnew C:\incredible.hlk 2684354560",0,true

    Open in new window

    LVL 1

    Author Comment

    WOW - It works perfectly!!!
    Great job!
    Thank you.
    LVL 81

    Expert Comment

    You're welcome! Thanks for the points and see you soon!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
    I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now