Rename a file: Difference between revisions

Content added Content deleted
No edit summary
Line 500: Line 500:
{{works with|JScript}}
{{works with|JScript}}
Throws an error if the destination file/folder exists.
Throws an error if the destination file/folder exists.
<lang javascript>var fso = new ActiveXObject("Scripting.FileSystemObject");
<lang javascript>var fso = new ActiveXObject("Scripting.FileSystemObject")
fso.MoveFile('input.txt', 'output.txt');
fso.MoveFile("input.txt", "output.txt")
fso.MoveFile('c:/input.txt', 'c:/output.txt');
fso.MoveFile("c:/input.txt", "c:/output.txt")
fso.MoveFolder('docs', 'mydocs');
fso.MoveFolder("docs", "mydocs")
fso.MoveFolder('c:/docs', 'c:/mydocs');</lang>
fso.MoveFolder("c:/docs", "c:/mydocs")</lang>


=={{header|Joy}}==
=={{header|Joy}}==