If you are simply capturing the data using a serial terminal application then all you need do is Serial.print the data values with a comma separating them.
Serial.print(temp1);
Serial.print(",");
Serial.print(temp2);
Serial.print(",");
Is as simple as you can get. You will get a long list of numbers with commas between the values.
You don't actually command the Arduino to send data to a file, that is the job on the PC, the Arduino is simply sending a stream of data to the PC.
Hope this helps.
Paul