The IsRootFolder property evaluates to true if the folder is the root folder, and false otherwise.
<html> <script language="JScript1.1"> <!-- var myFileSysObj = new ActiveXObject("Scripting.FileSystemObject"); var myFolder = myFileSysObj.GetFolder("\temp"); if(myFolder.IsRootFolder){ document.write(myFolder.Name + " is the root folder."); }else{ document.write(myFolder.Name + " is not the root folder."); } --> </script> </html>