Condividi tramite


DeleteFile

Elimina il file specificato.

function DeleteFile( 
   oFSO, 
   strFile  
) 

Parametri

  • oFSO
    Oggetto file system.

  • strFile
    Nome del file da eliminare.

Note

Chiamare questa funzione per eliminare il file specificato.

Esempio

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

Vedere anche

Attività

Creazione di una procedura guidata personalizzata

Concetti

Personalizzazione delle procedure guidate C++ con funzioni comuni JScript

Progettazione di una procedura guidata

Altre risorse

Funzioni JScript per procedure guidate C++