| title | DeleteFile | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 11/04/2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | article | |||||||||||||
| dev_langs |
|
|||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | 0cddaedb-8fad-440e-8f18-677fdff94a63 | |||||||||||||
| caps.latest.revision | 7 | |||||||||||||
| author | mikeblome | |||||||||||||
| ms.author | mblome | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
Deletes the specified file.
function DeleteFile(
oFSO,
strFile
)
oFSO
The file system object.
strFile
The name of the file to be deleted.
Call this function to delete the specified file.
// 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);
Customizing C++ Wizards with Common JScript Functions
JScript Functions for C++ Wizards
Creating a Custom Wizard
Designing a Wizard