The DeleteFolder() method removes an existing folder and all its contents.
foldername is a string specifying the folder name.
force is a Boolean value indicating whether to delete a file with read only permissions.
myObject = new ActiveXObject("Scripting.FileSystemObject");
Delete Folder: "newtmp"
<input type="Button" value="Click to Delete Folder" onClick='deleteFolder()'>