File.Move() : File : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » File »

 

File.Move()









Syntax








file.Move(destination)



The Move method moves a file from one location to another. This method takes a single parameter, destination, which represents the location to which the file is to be moved.












<html>
    <body>
    <script language="JScript">
    <!--
    function move()
    {
        var myObject, f;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        f =   myObject.GetFile("c:\test.txt");
        f.Move("D:\");
    }
    //-->
    </script>
    Move the file test.txt
    <form name="myForm">
    <input type="Button" vvalue="Move File" onClick='move()'>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» File