//JScript
var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.DeleteFolder("C:\\foldername");
'VBScript
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFolder("C:\\foldername")
Code from JScript5.chm and Vbscrip5.chm
Edit: Sorry guys, vbscript uses one slash and JScript uses two slashes. JScript uses two slashes as the first slash is used to denote an escaped character such as \n \r \t etc where as vbscript use vbCr vbLf vbTab and so on.