FileSystemObject.MoveFile() : FileSystemObject : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » FileSystemObject »

 

FileSystemObject.MoveFile()









Syntax








filesystemobject.MoveFile(source, destination)



The MoveFile() method moves a file from a source to a destination.












<html>
    <body>
    <script language="JScript">
    <!--
    function move()
    {
        var myObject;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        myObject.MoveFile("c:\test.txt""c:\tmp\test.txt");
    }
    -->
    </script>
    Move the file "test.txt" from c: to c:tmp
    <form name="myForm">
    <input type="Button" value="Move file" onClick='move()'>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» FileSystemObject