how to simulate disk full or create a very large file

Posted on 2004-11-08
Last Modified: 2006-11-17
I need to simulate a disk full scenario.  I need to have my system think that the hard drive is full.  
Only problem is I have 200 gigs of free disk space.  Can anyone think of a way to easily and quickly create
a very large file (199 gigs)?
Question by:kevinvw1
    LVL 6

    Assisted Solution

    Why don't you create a secondary partition of say 20 mb and use that for your testing.
    LVL 85

    Assisted Solution

    by:Mike Tomlinson
    Or how about using a 3.5 inch diskette for your testing?  That won't be so hard to fill.

    LVL 5

    Expert Comment

    199 gigs.  That's the Compact install for Windows XP isn't it? ;)

    btw If you totally fill your hard drive Windows will crash horribly and not have enough space to get itself going again.

    Author Comment

    ok, I have more info regarding this issue.  Sorry I was not fully informed when I first posted the question.  I am raising the points for my lack of info.

    This issue is related to a canned application which I do not have the source code for.  It is in a production environment so I can't mess with partitions, move it to smaller drive, etc., etc.  The canned application has a bug in it that returns a disk full message when you have TOO MUCH free disk space (that's some quality programming for you).  It only returns this message when you are trying to run a maintenance on the application's database files.  So what I wanted to do is 'fool' the application into thinking that the hard drive has less disk space available.  Apparently I only need to get down to about 20 gigs free.  I guess i could create a loop that populates a text file with data, but this would probably take a while and I'm not sure if windows could even handle a ~180gig file?  I guess i could create 180 1 gig text files....
    LVL 5

    Accepted Solution

    Copy a movie DVD onto your hard-drive.  That's a good 3/4 gigs.  

    You could then either write code to use the FileSystemObject to copy the directory over and over, or just manually copy it with Explorer and keep putting the copies inside each other so that each copy is then of several and so on.  It'll grow expotentially

    Author Comment

    In retrospect, this was a pretty weak question and I did not clarify myself.  I will try and come up with better questions for you guys.  I am going to split the points between you guys.  Thanks.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Article by: Martin
    Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    733 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

    16 Experts available now in Live!

    Get 1:1 Help Now