Replace tokens in file

Thank you Marian for your answer, I know how to replace tokens with the copy task, but what I would like to do is directly replace the tokens in a file without have to call the copy task.