joe_pool_is
Well-known member
We have been receiving a lot of high capacity flash drives with bad memory in the upper parts of the drive. For a 16 GB flash drive, most would probably never notice it, but once you do, the drive may become unreadable and all the data is gone!
One way we have been testing the drives is by copying just under 16 GB of photos and MP3s to it, then deleting them back off.
But Im a Developer! I want to develop something to do this instead!
I created a simple form with a start button. When the button is clicked, there is a simple loop inside a Try statement that writes data using a StreamWriter object:
The theory was, once the flash drive runs out of memory space, an Exception would be thrown within the Try block and the Finally block would neatly close the file.
The problem was, it ran for about 2 hours last night, and wasnt even up to 1-GB yet.
Yuck!
Is there a better, faster way to accomplish my objective?
One way we have been testing the drives is by copying just under 16 GB of photos and MP3s to it, then deleting them back off.
But Im a Developer! I want to develop something to do this instead!
I created a simple form with a start button. When the button is clicked, there is a simple loop inside a Try statement that writes data using a StreamWriter object:
Code:
Dim writer As New StreamWriter("F:\\filler.dat")
Try
While (True)
writer.Write("Red Rum! ")
End While
Catch ex As Exception
Finally
writer.Close()
End Try
The problem was, it ran for about 2 hours last night, and wasnt even up to 1-GB yet.
Yuck!
Is there a better, faster way to accomplish my objective?