how to create folder in javascript

<html>
<body>

<script>
  //Create Folder: "c:\testfolder" in specified location

  function createnewfolder()
  {
    var myFSOObject, newfolderObj;
    myFSOObject = new ActiveXObject("Scripting.FileSystemObject");
    newfolderObj = myFSOObject.CreateFolder ("c:\\newtmp\\");
  }
</script>

  <form name="myFormTest">
    <input type="Button" value="Click to Create New Folder" onClick='createnewfolder()'>
  </form>

</body>
</html>

How to read / write files using activex in JavaScript

1. Reading a file

function ReadFile()
{
var FileOpener = new ActiveXObject(“Scripting.FileSystemObject”);
var FilePointer = FileOpener.OpenTextFile(“C:\abcd.txt”, 1, true);
FileContents = FilePointer.ReadAll();
alert("FileContents  " + FileContents);
FilePointer.Close();
}

2. Writing a file

function WriteFile
{
var FileOpener = new ActiveXObject(“Scripting.FileSystemObject”);
var FilePointer = FileOpener.OpenTextFile(“C:\abcd.txt”, 8, true);
FilePointer.WriteLine(“Writing first line”);
FilePointer.Close();
}