Here's one script, just realize there are many possibilities to do this, each with it's own pro's and cons, especially for performance...

alias newfile {
  ; if the path or file has spaces, put " " around them
  var %oldfile = test.txt
  var %newfile = newtxtfile.txt
  .fopen old %oldfile
  if ($ferr) { echo %oldfile error | .fclose old | return }
  .fopen -n new %newfile
  if ($ferr) { echo %newfile error | .fclose new | return }
  while ((!$ferr) && ($fread(old))) {
    .fwrite -n new $gettok($v1,2,32) $gettok($v1,1,32)
  .fclose new
  .fclose old
  echo done
  echo error
  if ($fopen(new)) .fclose new
  if ($fopen(old)) .fclose old