looks like you're getting into some complicated but cool stuff there david. 1) and 4) I dont see any fclose commands after opening and writing to the file - maybe that has something to do with it 2) and 3) sorry no idea Simon