File.Size : File : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » File »

 

File.Size







The Size property returns the size of the specified file.












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







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» File