Make a backup file: Difference between revisions

Content added Content deleted
(Added 11l)
Line 13: Line 13:


Some examples on this page assume that the original file already exists. They might fail if some user is trying to create a new file.
Some examples on this page assume that the original file already exists. They might fail if some user is trying to create a new file.

=={{header|11l}}==
{{trans|Python}}

<lang 11l>V targetfile = ‘pycon-china’
fs:rename(fs:path:canonical(targetfile), fs:path:canonical(targetfile)‘.bak’)
V f = File(fs:path:canonical(targetfile), ‘w’)
f.write(‘this task was solved during a talk about rosettacode at the PyCon China in 2011’)
f.close()</lang>


=={{header|AutoHotkey}}==
=={{header|AutoHotkey}}==