If the file content is text (it's kind of implied in your question) and if the Arduino is connected to a Windows PC then you can print it to the serial port and use Gobetwino to log your text to a file on the PC without having to write the PC side code yourself.