It was not necessary to make a new post to post this solution.
You probably noticed that you could not post an answer in the other post, because it was closed. The other post was closed here, because it was moved to the
I/O and Streams forum. Look at the top of the page in the other post, you'll see that there are some BIG letters that say:
This topic has been MOVED to another forum: I/O and Streams
Please CLICK HERE to go to the new location.