DeleteFile
The latest version of this topic can be found at DeleteFile.
Deletes the specified file.
Syntax
function DeleteFile(
oFSO,
strFile
)
Parameters
oFSO
The file system object.
strFile
The name of the file to be deleted.
Remarks
Call this function to delete the specified file.
Example
// Declare a temporary file.
var strFile = strTempFolder + "\\" + strTarget;
var strClassName = strTarget.split(".");
wizard.AddSymbol("SAFE_CLASS_NAME", strClassName[0]);
wizard.AddSymbol("SAFE_ITEM_NAME", strClassName[0]);
// Declare the template name.
var strTemplate = strTemplatePath + "\\" + strTpl;
// Render and insert the template.
wizard.RenderTemplate(strTemplate, strFile, bCopyOnly);
// Create a new project file and add the file from the template.
var projfile = projItems.AddFromTemplate(strFile, strTarget);
// Delete the temporary file from the file structure object.
DeleteFile(fso, strFile);
See Also
Customizing C++ Wizards with Common JScript Functions
JScript Functions for C++ Wizards
Creating a Custom Wizard
Designing a Wizard