Syntax:
filesystemobject.FolderExists(foldername)
The FolderExists() method determines whether a specified folder exists.
This method takes foldername as its only parameter.
<html> <body> <script language="JScript"> <!-- function checkfolder() { var myObject; myObject = new ActiveXObject("Scripting.FileSystemObject"); if(myObject.FolderExists("c:\\tmp")){ alert("tmp Folder Exists"); } else { alert("tmp Folder doesn't exist"); } } --> </script> Check for folder "tmp" <form name="myForm"> <input type="Button" value="Check Folder" onClick='checkfolder()'> </form> </body> </html>