I really should read the in built help first before making posts like these. I found the solution

object.CreateTextFile(filename[, overwrite[, unicode]])