in reply to Write to different file name

There are several good answers (to a question of similar clarity) here. I think both of katgirl's solutions are appropriate as well.

-Bird