Duplicating file and replacing with string tokenizer