DIAdem Help

Method: DeleteFile for FileSystemObject

  • Updated2024-09-12
  • 1 minute(s) read

Method: DeleteFile for FileSystemObject

Deletes one or more files.

Object.DeleteFile(FileSpec, [Force])
ObjectFileSystemObject
Object with this method
FileSpecString
Specifies the path of the files that you want to delete. The path may contain wildcards in the last path component.
[Force]Boolean
Specifies whether DIAdem deletes write-protected files. If the value is True, DIAdem deletes write-protected files. If the value is False, DIAdem does not delete write-protected files. The default value is False.

The following example deletes one or more files:

Sub DeleteMyFiles(sFile,bForce)
  Dim fso
  Set fso = CreateObject("Scripting.FileSystemObject")
  Call fso.DeleteFile(sFile,bForce)
End Sub

Log in to get a better experience