Anonymous user
Make a backup file: Difference between revisions
m
→{{header|REXX}}: added/changed whitespace and comments.
(→{{header|Python}}: Added a version using pathlib) |
m (→{{header|REXX}}: added/changed whitespace and comments.) |
||
Line 522:
=={{header|REXX}}==
This REXX version executes under DOS or DOS under Windows.
<lang rexx>/*REXX
parse arg oFID . /*get a required argument from the C.L.*/
if oFID=='' then do
tFID= oFID'
call lineout
'ERASE'
'RENAME' oFID tFID /*rename the original file to backup. */
call lineout oFID, '═══This is line 1.' /*write one line to the original file. */
/*stick a fork in it, we're all done. */</lang>
The contents of the original file (before execution): '''A.FILE''':
<pre>
|