Export data in external csv file

Hello !

I read some topics about it but I did not find anything helpful so I am asking again.

I execute a Gatling scripts that create an Id, and I get it back in my response header that i already saved into a string.

I would like write this ID in a csv file available in my DATA folder so for every iteration the process will write the new ID in the new line of the file, so an other script could use this file as data.

Thanks in advance for your help