Set file type and Creator when I write a file

I’m having applescript read a file and replace some of the words in it and then I am writing to a new file which comes out as a text document. How can I have applescript set the creator and type when it writes the file?

Thanks,

Eekabob

Hi, Eekabob.

At the end of the process, something like this ” using your existing variables, of course:

tell application "Finder"
	tell file newFilePath to set {creator type, file type} to {creator type, file type} of file oldFilePath
end tell