# Real-Time Export of Data

So I was using a Genetic Algorithm to solve a problem. The inherit takes a lot of time to get me to the final answer, so I would like to monitor the process, and export the data real-time. The code is like this: gen={somerandomstart} inherit=Function[Something] NestWhile[inherit,gen,test] Currently I'm using save=(Export[somepath,#];#)&, but this generates a lot of files, and I had to import every file to get the best individual of each generation. Is there a way of writing (and deleting old data) in the same file?

• See OpenWrite and friends – Lukas Lang Jun 10 '18 at 12:57