var s = "C:/" +dirCreated[i];
sFolderPath = s;
var oShell = new ActiveXObject("Scripting.FileSystemObject");
if (! oShell.FolderExists(sFolderPath) )
oShell.CreateFolder(sFolderPath)
else
alert("THIS FOLDER ALREADY EXISTS")
OR you can do it like;
var oShell = new ActiveXObject("Scripting.FileSystemObject");
if (! oShell.FolderExists("C:\Test") )
oShell.CreateFolder("C:\Test")
else
alert("THIS FOLDER ALREADY EXISTS")
Go thr this link to know more about FileSystemObject (FSO) object model
http://www.yaldex.com/wjscript/sgProgrammingFileSystemObject.htm
Best Luck!!!!!!!!!!!!!!!!
Sujit.