Skip to content

Latest commit

 

History

History
84 lines (71 loc) · 1.87 KB

File metadata and controls

84 lines (71 loc) · 1.87 KB
title DeleteFile | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
devlang-cpp
ms.tgt_pltfrm
ms.topic article
dev_langs
C++
helpviewer_keywords
DeleteFile method
ms.assetid 0cddaedb-8fad-440e-8f18-677fdff94a63
caps.latest.revision 7
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

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