File.Name : File : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » File »

 

File.Name







The Name property is used to either set or get the name of a file object.












<html>
    <BODY>
    <script language="JScript">
    <!--
    function get()
    {
        var myObject, f;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        f =   myObject.GetFile("c:\test.txt");
        alert("The name of the file is: " + f.Name);
    }
    //-->
    </script>
    <form name="myForm">
    <INPUT type="Button" value="Get Name" onClick='get()'>
    </form>
    </BODY>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» File