09-09-2007, 04:11 AM
If you use flag (-1) with setfile it will append the text to the file not replace it like you're wanting to do, don't use any flag at all. As far as the counting I dont know why you would have to do that, numlines() will do that for you.
