There isn’t any functionality in the platform to write data to a file on your file system.
There are a few other workarounds that can be done here but those might involve creating a mini server to post the data or using Newman to create that file after a Collection run.