DeleteFile

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at DeleteFile.

Deletes the specified file.

  
      function DeleteFile(   
   oFSO,   
   strFile    
)   

Parameters

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

Show: