Implemented in version 2.0
file [, force]
This method is used to delete a specified file or files (using wildcards). The optional
parameter returns a Boolean value -
allows files with read-only attributes to be deleted, while
(default) does not. Trying to delete a read-only file without setting
will return an error.
Note that an error also occurs if you try to delete a file that doesn't exist.
Set filesys = CreateObject("Scripting.FileSystemObject")
filesys.CreateTextFile "c:\somefile.txt", True
If filesys.FileExists("c:\somefile.txt") Then
Copyright 1999-2004 by Infinite Software Solutions, Inc. All rights reserved.