Talk:Rename a file: Difference between revisions

From Rosetta Code
Content added Content deleted
(rexx = wrong?)
 
m (→‎REXX: added a belated comment.)
 
Line 32: Line 32:


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

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

Latest revision as of 06:09, 2 July 2016

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)