The following example illustrates the use of the
DeleteFile method.
JScriptfunction DeleteAFile(filespec)
{
var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.DeleteFile(filespec);
}
VBScriptSub DeleteAFile(filespec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile(filespec)
End Sub
PowerBASICSUB DeleteAFile (BYVAL strFileSpec AS STRING)
LOCAL fso AS IFileSystem
fso = NEWCOM ("Scripting.FileSystemObject")
fso.DeleteFile(UCODE$(strFileSpec))
END SUB