Previous Document Next Document

Object Model Reference : Classes : C : CorelScriptTools : Methods : CorelScriptTools.Kill


CorelScriptTools.Kill

Function Kill(FileName As String) As Boolean

Description

Member of CorelScriptTools

The Kill method deletes a file. Using this method is the same as clicking File } Delete in the Windows Explorer or in My Computer in Windows.

Parameter
Description
FileName
String expression specifying the filename to delete. You can use wild cards (* and ?) if you want to delete a group of files. For example, script*.* deletes all of the files in the current folder beginning with script. Using script?.* deletes all of the files in the current folder that begin with script and are followed by only one more character.

 
An open file cannot be deleted.
Example 1

The following VBA example deletes the file temp.out in the current folder.

KILL "temp.out"
Example 2

The following VBA example deletes the file temp.out in the C:\MyDocs folder.

KILL "C:\MyDocs\temp.out"

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.