Compartilhar via


DeleteFile

Exclui o arquivo especificado.

function DeleteFile( 
      oFSO, 
      strFile  
) 

Parâmetros

  • oFSO
    O objeto de sistema de arquivos.

  • strFile
    O nome do arquivo a ser excluído.

Comentários

Chame essa função para excluir o arquivo especificado.

Exemplo

// 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);

Consulte também

Tarefas

Criando um assistente personalizado

Conceitos

Personalizando assistentes C++ com funções comuns do JScript

Criando um assistente

Outros recursos

Funções de JScript para assistentes do C++