November 02, 2000 - Finding a File's Parent Folder
November 02, 2000 Finding a File's Parent Folder Tips: November 2000
Yehuda Shiran, Ph.D.
|
ParentFolder()
method of the File
object. Here is a piece of script that will print a file's folder:
<SCRIPT LANGUAGE="JavaScript">
<!--
myActiveXObject = new ActiveXObject("Scripting.FileSystemObject");
file = myActiveXObject.GetFile("f:\\yehuda\test.txt");
alert(file.ParentFolder());
// -->
</SCRIPT>
Here is the popout window that you'll get: