Thanks Erel!
That worked a treat.
As an aside, if the file already exists from a previous export, the data within the file is overwritten, but the file does not alter in size. So say the list was 50 items one time and then next time it was 60, the first 50 lines would be written to the file but the remaining 10 would not be, because the file does not expand in size?
I guess i could just check for the file, and delete it if it exists? whats the easiest way to do this?
Thanks.