Talk:Rename a file

From Rosetta Code

REXX

It looks like the REXX solutions are incorrect. To review, here they both are, version 1: <lang rexx>do 2

 'RENAME' "input.txt"  "output.txt"
 'CD'     "\"
 'MOVE'   "\docs"  "\mydocs"

end</lang>

and version 2: <lang rexx>do 2

 'RENAME' "input.txt  output.txt"
 'CD'     "\"
 'MOVE'   "\docs  \mydocs"

end</lang>

Problem is, it looks like they both fail to rename "docs" in the current directory. I think that the proper solutions would be more along the lines of these -- version 1: <lang rexx>do 2

 'RENAME' "input.txt"  "output.txt"
 'MOVE'   "docs"  "mydocs"
 'CD'     "\"

end</lang>

and version 2: <lang rexx>do 2

 'RENAME' "input.txt  output.txt"
 'MOVE'   "docs  mydocs"
 'CD'     "\"

end</lang>

...but I don't know enough about REXX to be able to say either way -- certainly not enough to mark the existing solutions as incorrect, or to know for sure if mine are right.

Any REXXers want to review what's here? -- Erik Siers 03:20, 24 May 2011 (UTC)

I've updated and fixed the original REXX programs.   -- Gerard Schildberger (talk) 06:09, 2 July 2016 (UTC)