<html>
<body>
<script language="JScript">
<!--
function remove()
{
var myObject;
myObject = new ActiveXObject("Scripting.FileSystemObject");
var f = myObject.GetFile("c:\\test.txt");
f.Delete();
}
//-->
</script>
Delete file "mytest.txt".
<form name="myForm">
<input type="Button" vvalue="Delete File" onClick='remove()'>
</form>
</body>
</html>
|