File.ParentFolder : File : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » File »

 

File.ParentFolder







The ParentFolder property determines the parent folder from which the file was obtained.












<html>
    <body>
    <script language="JScript">
    <!--
    function get()
    {
        var myObject, f;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        f = myObject.GetFile("c:\yourfolder\myTest.txt");
        alert("The name of the parent folder is: " + f.ParentFolder.Path);
    }
    //-->
    </script>
    Click to get the name of the parent folder
    <form name="myForm">
    <input type="Button" value="Get Parent Folder" onClick='get()'>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» File