DIAdem Help

Method: DeleteFolder for FileSystemObject

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

Method: DeleteFolder for FileSystemObject

Deletes a folder and its content.

Object.DeleteFolder(FolderSpec, [Force])
ObjectFileSystemObject
Object with this method
FolderSpecString
Specifies the path of the folder that is to be deleted. The path may contain wildcards in the last path component.
[Force]Boolean
Specifies whether DIAdem deletes write-protected files and folders. If the value is True, DIAdem deletes write-protected files and folders. If the value is False, DIAdem does not delete write-protected files and folders. The default value is False.

The following example deletes a folder:

Sub DeleteMyFolder(sFile)
   Dim fso
   Set fso = CreateObject("Scripting.FileSystemObject")
   fso.DeleteFolder(sFile)
End Sub

Log in to get a better experience