how to simulate disk full or create a very large file

Posted on 2004-11-08
Medium Priority
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

Assisted Solution

dsulkar earned 99 total points
ID: 12527032
Why don't you create a secondary partition of say 20 mb and use that for your testing.
LVL 86

Assisted Solution

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


Expert Comment

ID: 12527135
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.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 12527240
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....

Accepted Solution

RogueSolutions earned 102 total points
ID: 12527324
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

ID: 12527949
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

840 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