var objfso = new ActiveXObject("scripting.filesystemobject"); if (objfso.folderexists("c:\\scripts")) { WScript.Echo("the folder exists."); } else { WScript.Echo("the folder does not exist."); }