Arduino write a file on computer?

Is it possible to have an arduino write a .txt document or any thing like it? Such as I hit a button and it writes a few values to a file that it saved somewhere?

Yes, if you attach a shield that allow you to use SD cards. Alternatively, you can send stuff to the serial port and have a program in whatever your language of choice is on the PC that takes that data and puts it in a file.

If you're connecting the Arduino to a WIndows PC, you can use Inbetwino on the PC and have the Arduino instruct that to run whatever commands you need, such as reading and writing files on the PC.

you can use Inbetwino on the PC

Otherwise known as GoBetwino.

Oops, that'll teach me not to post after midnight!