| The FileSystemObject contains a method called DeleteFile. As its name implies, DeleteFile is used to delete a file from the Web server's file system.
DeleteFile takes one required and one optional parameter. The first parameter, which is required, is the physical file name of the file to delete, like C:\MyFiles\foo.txt. The second parameter, which is option, is a Boolean value (True or False) and, if not specified, defaults to a value of False. This second parameter determines whether or not read-only files can be deleted. If you will be deleting read-only files, you must specify the second parameter as True. |